mirror of
https://github.com/itflow-org/itflow
synced 2026-07-24 09:20:40 +00:00
Add Missing clientEnforcement in various modals, already handled on POST also add client selection in edit trip and enforce client permissions on trips
This commit is contained in:
@@ -23,7 +23,11 @@ $recurring_expense_created_at = nullable_htmlentities($row['recurring_expense_cr
|
||||
$recurring_expense_vendor_id = intval($row['recurring_expense_vendor_id']);
|
||||
$recurring_expense_category_id = intval($row['recurring_expense_category_id']);
|
||||
$recurring_expense_account_id = intval($row['recurring_expense_account_id']);
|
||||
$recurring_expense_client_id = intval($row['recurring_expense_client_id']);
|
||||
$client_id = intval($row['recurring_expense_client_id']);
|
||||
|
||||
if ($client_id) {
|
||||
enforceClientAccess();
|
||||
}
|
||||
|
||||
// Generate the HTML form content using output buffering.
|
||||
ob_start();
|
||||
@@ -238,12 +242,12 @@ ob_start();
|
||||
<option value="">- Select Client -</option>
|
||||
<?php
|
||||
|
||||
$sql_clients = mysqli_query($mysqli, "SELECT client_id, client_name FROM clients ORDER BY client_name ASC");
|
||||
$sql_clients = mysqli_query($mysqli, "SELECT client_id, client_name FROM clients WHERE 1 = 1 $access_permission_query ORDER BY client_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_clients)) {
|
||||
$client_id_select = intval($row['client_id']);
|
||||
$client_name_select = nullable_htmlentities($row['client_name']);
|
||||
?>
|
||||
<option <?php if ($recurring_expense_client_id == $client_id_select) { echo "selected"; } ?> value="<?php echo $client_id_select; ?>"><?php echo $client_name_select; ?></option>
|
||||
<option <?php if ($client_id == $client_id_select) { echo "selected"; } ?> value="<?php echo $client_id_select; ?>"><?php echo $client_name_select; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user