mirror of
https://github.com/itflow-org/itflow
synced 2026-08-05 07:07:14 +00:00
Use Short echo tags across the code
This commit is contained in:
@@ -132,9 +132,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<div class="card-body">
|
||||
<form autocomplete="off">
|
||||
<?php if ($client_url) { ?>
|
||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
||||
<input type="hidden" name="client_id" value="<?= $client_id ?>">
|
||||
<?php } ?>
|
||||
<input type="hidden" name="archived" value="<?php echo $archived; ?>">
|
||||
<input type="hidden" name="archived" value="<?= $archived ?>">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
@@ -165,7 +165,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$tag_id = intval($row['tag_id']);
|
||||
$tag_name = escapeHtml($row['tag_name']); ?>
|
||||
|
||||
<option value="<?php echo $tag_id ?>" <?php if (isset($_GET['tags']) && is_array($_GET['tags']) && in_array($tag_id, $_GET['tags'])) { echo 'selected'; } ?>> <?php echo $tag_name ?> </option>
|
||||
<option value="<?= $tag_id ?>" <?php if (isset($_GET['tags']) && is_array($_GET['tags']) && in_array($tag_id, $_GET['tags'])) { echo 'selected'; } ?>> <?= $tag_name ?> </option>
|
||||
|
||||
<?php } ?>
|
||||
</select>
|
||||
@@ -184,7 +184,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$location_id = intval($row['location_id']);
|
||||
$location_name = escapeHtml($row['location_name']);
|
||||
?>
|
||||
<option <?php if ($location_filter == $location_id) { echo "selected"; } ?> value="<?php echo $location_id; ?>"><?php echo $location_name; ?></option>
|
||||
<option <?php if ($location_filter == $location_id) { echo "selected"; } ?> value="<?= $location_id ?>"><?= $location_name ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -211,7 +211,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$client_id = intval($row['client_id']);
|
||||
$client_name = escapeHtml($row['client_name']);
|
||||
?>
|
||||
<option <?php if ($client == $client_id) { echo "selected"; } ?> value="<?php echo $client_id; ?>"><?php echo $client_name; ?></option>
|
||||
<option <?php if ($client == $client_id) { echo "selected"; } ?> value="<?= $client_id ?>"><?= $client_name ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -223,7 +223,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="btn-group float-right">
|
||||
<a href="?<?php echo $client_url; ?>&archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
||||
<a href="?<?= $client_url ?>&archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
||||
class="btn btn-<?php if($archived == 1){ echo "primary"; } else { echo "default"; } ?>">
|
||||
<i class="fa fa-fw fa-archive mr-2"></i>Archived
|
||||
</a>
|
||||
@@ -274,7 +274,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</form>
|
||||
<hr>
|
||||
<form id="bulkActions" action="post.php" method="post">
|
||||
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
|
||||
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover">
|
||||
@@ -286,7 +286,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</div>
|
||||
</td>
|
||||
<th>
|
||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=credential_name&order=<?php echo $disp; ?>">
|
||||
<a class="text-secondary" href="?<?= $url_query_strings_sort ?>&sort=credential_name&order=<?= $disp ?>">
|
||||
Name <?php if ($sort == 'credential_name') { echo $order_icon; } ?>
|
||||
</a>
|
||||
</th>
|
||||
@@ -294,14 +294,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<th>Password / Key</th>
|
||||
<th>OTP</th>
|
||||
<th>
|
||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=credential_uri&order=<?php echo $disp; ?>">
|
||||
<a class="text-secondary" href="?<?= $url_query_strings_sort ?>&sort=credential_uri&order=<?= $disp ?>">
|
||||
URI <?php if ($sort == 'credential_uri') { echo $order_icon; } ?>
|
||||
</a>
|
||||
</th>
|
||||
<th></th>
|
||||
<?php if (!$client_url) { ?>
|
||||
<th>
|
||||
<a class="text-secondary" href="?<?php echo $url_query_strings_sort; ?>&sort=client_name&order=<?php echo $disp; ?>">
|
||||
<a class="text-secondary" href="?<?= $url_query_strings_sort ?>&sort=client_name&order=<?= $disp ?>">
|
||||
Client <?php if ($sort == 'client_name') { echo $order_icon; } ?>
|
||||
</a>
|
||||
</th>
|
||||
@@ -419,7 +419,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<tr class="<?php if ($credential_favorite) { echo "text-bold"; } ?>">
|
||||
<td class="bg-light checkbox-column">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input bulk-select" type="checkbox" name="credential_ids[]" value="<?php echo $credential_id ?>">
|
||||
<input class="form-check-input bulk-select" type="checkbox" name="credential_ids[]" value="<?= $credential_id ?>">
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
@@ -428,38 +428,38 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<div class="media">
|
||||
<i class="fa fa-fw fa-2x fa-key mr-3"></i>
|
||||
<div class="media-body">
|
||||
<div><?php echo $credential_name; ?> <?php if ($credential_favorite) { echo "<i class='fas fa-fw fa-star text-warning' title='Favorite'></i>"; } ?></div>
|
||||
<div><small class="text-secondary"><?php echo $credential_description; ?></small></div>
|
||||
<div><?= $credential_name ?> <?php if ($credential_favorite) { echo "<i class='fas fa-fw fa-star text-warning' title='Favorite'></i>"; } ?></div>
|
||||
<div><small class="text-secondary"><?= $credential_description ?></small></div>
|
||||
<?php
|
||||
if (!empty($credential_tags_display)) { ?>
|
||||
<div class="mt-1">
|
||||
<?php echo $credential_tags_display; ?>
|
||||
<?= $credential_tags_display ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-nowrap"><?php echo $credential_username_display; ?></td>
|
||||
<td class="text-nowrap"><?= $credential_username_display ?></td>
|
||||
<td class="text-nowrap">
|
||||
<button class="btn p-0" type="button" onclick="showPasswordViaCredentialID(this, <?php echo $credential_id; ?>)"><i class="fas fa-2x fa-ellipsis-h text-secondary"></i><i class="fas fa-2x fa-ellipsis-h text-secondary"></i></button><button class="btn btn-sm" type="button" onclick="copyPasswordViaCredentialID(this, <?php echo $credential_id; ?>)"><i class="far fa-copy text-secondary"></i></button>
|
||||
<button class="btn p-0" type="button" onclick="showPasswordViaCredentialID(this, <?= $credential_id ?>)"><i class="fas fa-2x fa-ellipsis-h text-secondary"></i><i class="fas fa-2x fa-ellipsis-h text-secondary"></i></button><button class="btn btn-sm" type="button" onclick="copyPasswordViaCredentialID(this, <?= $credential_id ?>)"><i class="far fa-copy text-secondary"></i></button>
|
||||
</td>
|
||||
<td class="text-nowrap"><?php echo $otp_display; ?></td>
|
||||
<td><?php echo $credential_uri_display; ?></td>
|
||||
<td class="text-nowrap"><?= $otp_display ?></td>
|
||||
<td><?= $credential_uri_display ?></td>
|
||||
<td>
|
||||
<?php echo "$credential_contact_display$credential_asset_display"; ?>
|
||||
<?= "$credential_contact_display$credential_asset_display" ?>
|
||||
<?php if (mysqli_num_rows($sql_shared) > 0) { ?>
|
||||
<div class="media" title="Expires <?php echo $item_expire_at_human; ?>">
|
||||
<div class="media" title="Expires <?= $item_expire_at_human ?>">
|
||||
<i class="fas fa-link mr-2 mt-1"></i>
|
||||
<div class="media-body">Shared
|
||||
<br>
|
||||
<small class="text-secondary"><?php echo $item_recipient; ?></small>
|
||||
<small class="text-secondary"><?= $item_recipient ?></small>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php if (!$client_url) { ?>
|
||||
<td><a href="credentials.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
|
||||
<td><a href="credentials.php?client_id=<?= $client_id ?>"><?= $client_name ?></a></td>
|
||||
<?php } ?>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
@@ -470,14 +470,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<?php if ($credential_uri) { ?>
|
||||
<a href="<?php echo $credential_uri; ?>" alt="<?php echo $credential_uri; ?>" target="_blank" class="dropdown-item" >
|
||||
<i class="fa fa-fw fa-external-link-alt"></i> <?php echo truncate($credential_uri,40); ?>
|
||||
<a href="<?= $credential_uri ?>" alt="<?= $credential_uri ?>" target="_blank" class="dropdown-item" >
|
||||
<i class="fa fa-fw fa-external-link-alt"></i> <?= truncate($credential_uri,40) ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php if ($credential_uri_2) { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a href="<?php echo $credential_uri_2; ?>" target="_blank" class="dropdown-item" >
|
||||
<i class="fa fa-fw fa-external-link-alt"></i> <?php echo truncate($credential_uri_2,40); ?>
|
||||
<a href="<?= $credential_uri_2 ?>" target="_blank" class="dropdown-item" >
|
||||
<i class="fa fa-fw fa-external-link-alt"></i> <?= truncate($credential_uri_2,40) ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@@ -494,25 +494,25 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<?php if ($client_url) { ?>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#shareModal" onclick="populateShareModal(<?php echo "$client_id, 'Credential', $credential_id"; ?>)">
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#shareModal" onclick="populateShareModal(<?= "$client_id, 'Credential', $credential_id" ?>)">
|
||||
<i class="fas fa-fw fa-share mr-2"></i>Share
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php if (lookupUserPermission("module_credential") >= 2) { ?>
|
||||
<?php if ($credential_archived_at) { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-info confirm-link" href="post.php?restore_credential=<?php echo $credential_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
||||
<a class="dropdown-item text-info confirm-link" href="post.php?restore_credential=<?= $credential_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
||||
</a>
|
||||
<?php if (lookupUserPermission("module_credential") >= 3) { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_credential=<?php echo $credential_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_credential=<?= $credential_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||
<?php } ?>
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_credential=<?php echo $credential_id; ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
||||
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_credential=<?= $credential_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||
</a>
|
||||
<?php } ?>
|
||||
|
||||
Reference in New Issue
Block a user