mirror of
https://github.com/itflow-org/itflow
synced 2026-07-24 09:20:40 +00:00
Replace Function nullable_htmlentities() with just escapeHtml() and update all instances throughout
This commit is contained in:
@@ -63,7 +63,7 @@ ob_start();
|
||||
$sql = mysqli_query($mysqli, "SELECT client_id, client_name FROM clients WHERE client_archived_at IS NULL $access_permission_query ORDER BY client_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql)) {
|
||||
$client_id_select = intval($row['client_id']);
|
||||
$client_name = nullable_htmlentities($row['client_name']); ?>
|
||||
$client_name = escapeHtml($row['client_name']); ?>
|
||||
<option value="<?php echo $client_id_select; ?>"><?php echo $client_name; ?></option>
|
||||
|
||||
<?php } ?>
|
||||
@@ -103,9 +103,9 @@ ob_start();
|
||||
|
||||
while ($row = mysqli_fetch_assoc($sql_ticket_templates)) {
|
||||
$ticket_template_id_select = intval($row['ticket_template_id']);
|
||||
$ticket_template_name_select = nullable_htmlentities($row['ticket_template_name']);
|
||||
$ticket_template_subject_select = nullable_htmlentities($row['ticket_template_subject']);
|
||||
$ticket_template_details_select = nullable_htmlentities($row['ticket_template_details']);
|
||||
$ticket_template_name_select = escapeHtml($row['ticket_template_name']);
|
||||
$ticket_template_subject_select = escapeHtml($row['ticket_template_subject']);
|
||||
$ticket_template_details_select = escapeHtml($row['ticket_template_details']);
|
||||
$task_count = intval($row['task_count']);
|
||||
?>
|
||||
<option value="<?php echo $ticket_template_id_select; ?>"
|
||||
@@ -163,7 +163,7 @@ ob_start();
|
||||
$sql_categories = mysqli_query($mysqli, "SELECT category_id, category_name FROM categories WHERE category_type = 'Ticket' AND category_archived_at IS NULL ORDER BY category_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_categories)) {
|
||||
$category_id = intval($row['category_id']);
|
||||
$category_name = nullable_htmlentities($row['category_name']);
|
||||
$category_name = escapeHtml($row['category_name']);
|
||||
|
||||
?>
|
||||
<option value="<?php echo $category_id; ?>"><?php echo $category_name; ?></option>
|
||||
@@ -204,7 +204,7 @@ ob_start();
|
||||
);
|
||||
while ($row = mysqli_fetch_assoc($sql)) {
|
||||
$user_id = intval($row['user_id']);
|
||||
$user_name = nullable_htmlentities($row['user_name']); ?>
|
||||
$user_name = escapeHtml($row['user_name']); ?>
|
||||
<option <?php if ($session_user_id == $user_id) { echo "selected"; } ?> value="<?php echo $user_id; ?>"><?php echo $user_name; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
@@ -253,7 +253,7 @@ ob_start();
|
||||
$sql = mysqli_query($mysqli, "SELECT contact_id, contact_name, contact_title, contact_primary, contact_technical FROM contacts WHERE contact_client_id = $client_id AND contact_archived_at IS NULL ORDER BY contact_primary DESC, contact_technical DESC, contact_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql)) {
|
||||
$contact_id_select = intval($row['contact_id']);
|
||||
$contact_name_select = nullable_htmlentities($row['contact_name']);
|
||||
$contact_name_select = escapeHtml($row['contact_name']);
|
||||
$contact_primary_select = intval($row['contact_primary']);
|
||||
if($contact_primary_select == 1) {
|
||||
$contact_primary_display = " (Primary)";
|
||||
@@ -266,7 +266,7 @@ ob_start();
|
||||
} else {
|
||||
$contact_technical_display = "";
|
||||
}
|
||||
$contact_title_select = nullable_htmlentities($row['contact_title']);
|
||||
$contact_title_select = escapeHtml($row['contact_title']);
|
||||
if($contact_title_select) {
|
||||
$contact_title_display = " - $contact_title_select";
|
||||
} else {
|
||||
@@ -302,7 +302,7 @@ ob_start();
|
||||
<?php
|
||||
$sql = mysqli_query($mysqli, "SELECT contact_email FROM contacts WHERE contact_client_id = $client_id AND contact_archived_at IS NULL AND contact_email IS NOT NULL ORDER BY contact_email ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql)) {
|
||||
$contact_email = nullable_htmlentities($row['contact_email']);
|
||||
$contact_email = escapeHtml($row['contact_email']);
|
||||
?>
|
||||
<option><?php echo $contact_email; ?></option>
|
||||
|
||||
@@ -328,8 +328,8 @@ ob_start();
|
||||
$sql_assets = mysqli_query($mysqli, "SELECT asset_id, asset_name, contact_name FROM assets LEFT JOIN contacts ON contact_id = asset_contact_id WHERE asset_client_id = $client_id AND asset_archived_at IS NULL ORDER BY asset_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_assets)) {
|
||||
$asset_id_select = intval($row['asset_id']);
|
||||
$asset_name_select = nullable_htmlentities($row['asset_name']);
|
||||
$asset_contact_name_select = nullable_htmlentities($row['contact_name']);
|
||||
$asset_name_select = escapeHtml($row['asset_name']);
|
||||
$asset_contact_name_select = escapeHtml($row['contact_name']);
|
||||
?>
|
||||
<option value="<?php echo $asset_id_select; ?>"
|
||||
<?php if ($asset_id == $asset_id_select) { echo "selected"; }?>
|
||||
@@ -353,8 +353,8 @@ ob_start();
|
||||
$sql_assets = mysqli_query($mysqli, "SELECT asset_id, asset_name, contact_name FROM assets LEFT JOIN contacts ON contact_id = asset_contact_id WHERE asset_client_id = $client_id AND asset_archived_at IS NULL ORDER BY asset_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_assets)) {
|
||||
$asset_id_select = intval($row['asset_id']);
|
||||
$asset_name_select = nullable_htmlentities($row['asset_name']);
|
||||
$asset_contact_name_select = nullable_htmlentities($row['contact_name']);
|
||||
$asset_name_select = escapeHtml($row['asset_name']);
|
||||
$asset_contact_name_select = escapeHtml($row['contact_name']);
|
||||
?>
|
||||
<option value="<?php echo $asset_id_select; ?>">
|
||||
<?php echo "$asset_name_select - $asset_contact_name_select"; ?>
|
||||
@@ -378,7 +378,7 @@ ob_start();
|
||||
$sql_locations = mysqli_query($mysqli, "SELECT location_id, location_name FROM locations WHERE location_client_id = $client_id AND location_archived_at IS NULL ORDER BY location_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_locations)) {
|
||||
$location_id_select = intval($row['location_id']);
|
||||
$location_name_select = nullable_htmlentities($row['location_name']);
|
||||
$location_name_select = escapeHtml($row['location_name']);
|
||||
?>
|
||||
<option value="<?php echo $location_id_select; ?>"><?php echo $location_name_select; ?></option>
|
||||
|
||||
@@ -404,7 +404,7 @@ ob_start();
|
||||
$sql_vendors = mysqli_query($mysqli, "SELECT vendor_id, vendor_name FROM vendors WHERE vendor_client_id = $client_id AND vendor_archived_at IS NULL ORDER BY vendor_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_vendors)) {
|
||||
$vendor_id_select = intval($row['vendor_id']);
|
||||
$vendor_name_select = nullable_htmlentities($row['vendor_name']); ?>
|
||||
$vendor_name_select = escapeHtml($row['vendor_name']); ?>
|
||||
<option value="<?php echo $vendor_id_select; ?>"><?php echo $vendor_name_select; ?></option>
|
||||
|
||||
<?php } ?>
|
||||
@@ -443,7 +443,7 @@ ob_start();
|
||||
$sql_projects = mysqli_query($mysqli, "SELECT project_id, project_name FROM projects WHERE project_client_id = $client_id AND project_completed_at IS NULL AND project_archived_at IS NULL ORDER BY project_name ASC");
|
||||
while ($row = mysqli_fetch_assoc($sql_projects)) {
|
||||
$project_id_select = intval($row['project_id']);
|
||||
$project_name_select = nullable_htmlentities($row['project_name']); ?>
|
||||
$project_name_select = escapeHtml($row['project_name']); ?>
|
||||
<option <?php if ($project_id == $project_id_select) { echo "selected"; } ?> value="<?php echo $project_id_select; ?>"><?php echo $project_name_select; ?></option>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
Reference in New Issue
Block a user