Use Short echo tags across the code

This commit is contained in:
johnnyq
2026-07-28 18:47:52 -04:00
parent 0031438bce
commit b3f959ac55
355 changed files with 3113 additions and 3113 deletions

View File

@@ -53,7 +53,7 @@ ob_start();
</ul>
<form action="post.php" method="post" autocomplete="off">
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<div class="modal-body">
<div class="tab-content">
@@ -110,7 +110,7 @@ ob_start();
while ($row = mysqli_fetch_assoc($referral_sql)) {
$referral = escapeHtml($row['category_name']); ?>
<option><?php echo $referral; ?></option>
<option><?= $referral ?></option>
<?php } ?>
</select>
@@ -146,7 +146,7 @@ ob_start();
$tag_id_select = intval($row['tag_id']);
$tag_name_select = escapeHtml($row['tag_name']);
?>
<option value="<?php echo $tag_id_select; ?>"><?php echo $tag_name_select; ?></option>
<option value="<?= $tag_id_select ?>"><?= $tag_name_select ?></option>
<?php } ?>
</select>
@@ -212,7 +212,7 @@ ob_start();
<select class="form-control select2" name="country">
<option value="">- Select Country -</option>
<?php foreach($countries_array as $country_name) { ?>
<option <?php if ($session_company_country == $country_name) { echo "selected"; } ?> ><?php echo $country_name; ?></option>
<option <?php if ($session_company_country == $country_name) { echo "selected"; } ?> ><?= $country_name ?></option>
<?php } ?>
</select>
</div>
@@ -335,7 +335,7 @@ ob_start();
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-clock"></i></span>
</div>
<input type="text" class="form-control" inputmode="decimal" pattern="[0-9]*\.?[0-9]{0,2}" name="rate" placeholder="0.00" value="<?php echo "$config_default_hourly_rate"; ?>">
<input type="text" class="form-control" inputmode="decimal" pattern="[0-9]*\.?[0-9]{0,2}" name="rate" placeholder="0.00" value="<?= "$config_default_hourly_rate" ?>">
</div>
</div>
@@ -347,7 +347,7 @@ ob_start();
</div>
<select class="form-control select2" name="net_terms">
<?php foreach($net_terms_array as $net_term_value => $net_term_name) { ?>
<option <?php if ($config_default_net_terms == $net_term_value) { echo "selected"; } ?> value="<?php echo $net_term_value; ?>"><?php echo $net_term_name; ?></option>
<option <?php if ($config_default_net_terms == $net_term_value) { echo "selected"; } ?> value="<?= $net_term_value ?>"><?= $net_term_name ?></option>
<?php } ?>
</select>
</div>

View File

@@ -67,7 +67,7 @@ ob_start();
$category_name = escapeHtml($row['category_name']);
?>
<option value="<?php echo $category_id; ?>"><?php echo $category_name; ?></option>
<option value="<?= $category_id ?>"><?= $category_name ?></option>
<?php } ?>
</select>
@@ -98,7 +98,7 @@ ob_start();
while ($row = mysqli_fetch_assoc($sql)) {
$user_id = intval($row['user_id']);
$user_name = escapeHtml($row['user_name']); ?>
<option value="<?php echo $user_id; ?>"><?php echo $user_name; ?></option>
<option value="<?= $user_id ?>"><?= $user_name ?></option>
<?php } ?>
</select>
</div>
@@ -121,7 +121,7 @@ ob_start();
while ($row = mysqli_fetch_assoc($sql_projects)) {
$project_id_select = intval($row['project_id']);
$project_name_select = escapeHtml($row['project_name']); ?>
<option value="<?php echo $project_id_select; ?>"><?php echo $project_name_select; ?></option>
<option value="<?= $project_id_select ?>"><?= $project_name_select ?></option>
<?php } ?>
</select>

View File

@@ -43,7 +43,7 @@ ob_start();
$tag_id_select = intval($row['tag_id']);
$tag_name_select = escapeHtml($row['tag_name']);
?>
<option value="<?php echo $tag_id_select; ?>"><?php echo $tag_name_select; ?></option>
<option value="<?= $tag_id_select ?>"><?= $tag_name_select ?></option>
<?php } ?>
</select>

View File

@@ -43,8 +43,8 @@ ob_start();
<select class="form-control select2" name="net_terms">
<option value="">- Net Terms -</option>
<?php foreach ($net_terms_array as $net_term_value => $net_term_name) { ?>
<option value="<?php echo $net_term_value; ?>">
<?php echo $net_term_name; ?>
<option value="<?= $net_term_value ?>">
<?= $net_term_name ?>
</option>
<?php } ?>
</select>

View File

@@ -34,7 +34,7 @@ ob_start();
$referral_sql = mysqli_query($mysqli, "SELECT * FROM categories WHERE category_type = 'Referral' AND category_archived_at IS NULL ORDER BY category_name ASC");
while ($row = mysqli_fetch_assoc($referral_sql)) {
$referral = escapeHtml($row['category_name']); ?>
<option><?php echo $referral; ?></option>
<option><?= $referral ?></option>
<?php } ?>
</select>

View File

@@ -28,20 +28,20 @@ ob_start();
<div class="form-group col-sm-6">
<select type="text" class="form-control select2" name="mail_from">
<option value="<?php echo escapeHtml($config_mail_from_email); ?>">
<?php echo escapeHtml("$config_mail_from_name - $config_mail_from_email"); ?></option>
<option value="<?php echo escapeHtml($config_invoice_from_email); ?>">
<?php echo escapeHtml("$config_invoice_from_name - $config_invoice_from_email"); ?></option>
<option value="<?php echo escapeHtml($config_quote_from_email); ?>">
<?php echo escapeHtml("$config_quote_from_name - $config_quote_from_email"); ?></option>
<option value="<?php echo escapeHtml($config_ticket_from_email); ?>">
<?php echo escapeHtml("$config_ticket_from_name - $config_ticket_from_email"); ?></option>
<option value="<?= escapeHtml($config_mail_from_email) ?>">
<?= escapeHtml("$config_mail_from_name - $config_mail_from_email") ?></option>
<option value="<?= escapeHtml($config_invoice_from_email) ?>">
<?= escapeHtml("$config_invoice_from_name - $config_invoice_from_email") ?></option>
<option value="<?= escapeHtml($config_quote_from_email) ?>">
<?= escapeHtml("$config_quote_from_name - $config_quote_from_email") ?></option>
<option value="<?= escapeHtml($config_ticket_from_email) ?>">
<?= escapeHtml("$config_ticket_from_name - $config_ticket_from_email") ?></option>
</select>
</div>
<div class="form-group col-sm-6">
<input type="text" class="form-control" name="mail_from_name" placeholder="From Name" maxlength="255"
value="<?php echo escapeHtml($config_mail_from_name); ?>">
value="<?= escapeHtml($config_mail_from_name) ?>">
</div>
</div>

View File

@@ -2,13 +2,13 @@
<div class="modal-dialog">
<div class="modal-content border-dark">
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fa fa-fw fa-wallet mr-2"></i>Adding <strong>Credit</strong> (Credit Balance: <?php echo numfmt_format_currency($currency_format, $credit_balance, $client_currency_code); ?>)</h5>
<h5 class="modal-title"><i class="fa fa-fw fa-wallet mr-2"></i>Adding <strong>Credit</strong> (Credit Balance: <?= numfmt_format_currency($currency_format, $credit_balance, $client_currency_code) ?>)</h5>
<button type="button" class="close text-white" data-dismiss="modal">
<span>&times;</span>
</button>
</div>
<form action="post.php" method="post" autocomplete="off">
<input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token'] ?>">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<div class="modal-body">
<div class="form-group">
@@ -57,7 +57,7 @@
</div>
<?php if (isset($_GET['client_id'])) { ?>
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
<input type="hidden" name="client" value="<?= $client_id ?>">
<?php } else { ?>
<div class="form-group">
@@ -75,7 +75,7 @@
$client_id = intval($row['client_id']);
$client_name = escapeHtml($row['client_name']);
?>
<option value="<?php echo $client_id; ?>"><?php echo $client_name; ?></option>
<option value="<?= $client_id ?>"><?= $client_name ?></option>
<?php
}

View File

@@ -1,17 +1,17 @@
<div class="modal" id="deleteClientModal<?php echo $client_id; ?>" tabindex="-1">
<div class="modal" id="deleteClientModal<?= $client_id ?>" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<div class="mb-4" style="text-align: center;">
<i class="far fa-10x fa-times-circle text-danger mb-3 mt-3"></i>
<h2>Are you really, really, really sure?</h2>
<h6 class="mb-4 text-secondary">Do you really want to <b>delete <i><?php echo $client_name; ?></i> and ALL associated data</b>? This includes <i><?php echo $client_name; ?></i>'s documents, tickets, files, payments, invoices, logs, etc.<br>See <a href="https://forum.itflow.org/d/1147-deleting-a-client-deletes-payments" target="_blank">this</a> forum post.<br><br>This process cannot be undone.</h6>
<h6 class="mb-4 text-secondary">Do you really want to <b>delete <i><?= $client_name ?></i> and ALL associated data</b>? This includes <i><?= $client_name ?></i>'s documents, tickets, files, payments, invoices, logs, etc.<br>See <a href="https://forum.itflow.org/d/1147-deleting-a-client-deletes-payments" target="_blank">this</a> forum post.<br><br>This process cannot be undone.</h6>
<div class="form-group">
<input type="hidden" id="clientName<?php echo $client_id ?>" value="<?php echo $client_name; ?>">
<input class="form-control" type="text" id="clientNameProvided<?php echo $client_id ?>" onkeyup="validateClientNameDelete(<?php echo $client_id ?>)" placeholder="Type '<?php echo $client_name; ?>' to confirm data deletion">
<input type="hidden" id="clientName<?= $client_id ?>" value="<?= $client_name ?>">
<input class="form-control" type="text" id="clientNameProvided<?= $client_id ?>" onkeyup="validateClientNameDelete(<?= $client_id ?>)" placeholder="Type '<?= $client_name ?>' to confirm data deletion">
</div>
<button type="button" class="btn btn-outline-secondary btn-lg px-5 mr-4" data-dismiss="modal">Cancel</button>
<a class="btn btn-danger btn-lg px-5 disabled" id="clientDeleteButton<?php echo $client_id ?>" href="post.php?delete_client=<?php echo $client_id; ?>&csrf_token=<?php echo $_SESSION['csrf_token'] ?>">Yes, Delete!</a>
<a class="btn btn-danger btn-lg px-5 disabled" id="clientDeleteButton<?= $client_id ?>" href="post.php?delete_client=<?= $client_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">Yes, Delete!</a>
</div>
</div>
</div>

View File

@@ -9,7 +9,7 @@
</div>
<form action="post.php" method="post" autocomplete="off" target="_blank">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
<input type="hidden" name="client_id" value="<?= $client_id ?>">
<div class="modal-body">
<ul class="list-group">
<div class="row">

View File

@@ -48,7 +48,7 @@ ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class='fa fa-fw fa-user-edit mr-2'></i>Editing Client: <strong><?php echo $client_name; ?></strong></h5>
<h5 class="modal-title"><i class='fa fa-fw fa-user-edit mr-2'></i>Editing Client: <strong><?= $client_name ?></strong></h5>
<button type="button" class="close text-white" data-dismiss="modal">
<span>&times;</span>
</button>
@@ -60,15 +60,15 @@ ob_start();
<ul class="modal-header nav nav-pills nav-justified mb-3">
<li class="nav-item">
<a class="nav-link active" data-toggle="pill" href="#pills-client-details<?php echo $client_id; ?>">Details</a>
<a class="nav-link active" data-toggle="pill" href="#pills-client-details<?= $client_id ?>">Details</a>
</li>
<?php if ($config_module_enable_accounting) { ?>
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#pills-client-billing<?php echo $client_id; ?>">Billing</a>
<a class="nav-link" data-toggle="pill" href="#pills-client-billing<?= $client_id ?>">Billing</a>
</li>
<?php } ?>
<li class="nav-item">
<a class="nav-link" data-toggle="pill" href="#pills-client-notes<?php echo $client_id; ?>">Notes</a>
<a class="nav-link" data-toggle="pill" href="#pills-client-notes<?= $client_id ?>">Notes</a>
</li>
</ul>
@@ -76,7 +76,7 @@ ob_start();
<div class="tab-content">
<div class="tab-pane fade show active" id="pills-client-details<?php echo $client_id; ?>">
<div class="tab-pane fade show active" id="pills-client-details<?= $client_id ?>">
<div class="form-group">
<label>Name <strong class="text-danger">*</strong> / <span class="text-secondary">Is Lead</span></label>
@@ -85,7 +85,7 @@ ob_start();
<span class="input-group-text"><i class="fa fa-fw fa-id-badge"></i></span>
</div>
<input type="text" class="form-control" name="name" placeholder="Name or Company" maxlength="200"
value="<?php echo $client_name; ?>" required>
value="<?= $client_name ?>" required>
<div class="input-group-append">
<div class="input-group-text">
<input type="checkbox" name="lead" value="1" <?php if($client_is_lead == 1){ echo "checked"; } ?>>
@@ -100,7 +100,7 @@ ob_start();
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-id-badge"></i></span>
</div>
<input type="text" class="form-control" name="abbreviation" placeholder="Shortned name for client - Max chars 6" value="<?php echo $client_abbreviation; ?>" maxlength="6" oninput="this.value = this.value.toUpperCase()">
<input type="text" class="form-control" name="abbreviation" placeholder="Shortned name for client - Max chars 6" value="<?= $client_abbreviation ?>" maxlength="6" oninput="this.value = this.value.toUpperCase()">
</div>
</div>
@@ -111,7 +111,7 @@ ob_start();
<span class="input-group-text"><i class="fa fa-fw fa-briefcase"></i></span>
</div>
<input type="text" class="form-control" name="type" placeholder="Industry"
value="<?php echo $client_type; ?>">
value="<?= $client_type ?>">
</div>
</div>
@@ -132,7 +132,7 @@ ob_start();
<option <?php if ($client_referral == $referral) {
echo "selected";
} ?>>
<?php echo $referral; ?>
<?= $referral ?>
</option>
<?php
@@ -155,7 +155,7 @@ ob_start();
<span class="input-group-text"><i class="fa fa-fw fa-globe"></i></span>
</div>
<input type="text" class="form-control" name="website" placeholder="ex. google.com" maxlength="200"
value="<?php echo $client_website; ?>">
value="<?= $client_website ?>">
</div>
</div>
@@ -173,7 +173,7 @@ ob_start();
$tag_id_select = intval($row['tag_id']);
$tag_name_select = escapeHtml($row['tag_name']);
?>
<option value="<?php echo $tag_id_select; ?>" <?php if (in_array($tag_id_select, $client_tag_id_array)) { echo "selected"; } ?>><?php echo $tag_name_select; ?></option>
<option value="<?= $tag_id_select ?>" <?php if (in_array($tag_id_select, $client_tag_id_array)) { echo "selected"; } ?>><?= $tag_name_select ?></option>
<?php } ?>
</select>
@@ -190,7 +190,7 @@ ob_start();
<?php if ($config_module_enable_accounting) { ?>
<div class="tab-pane fade" id="pills-client-billing<?php echo $client_id; ?>">
<div class="tab-pane fade" id="pills-client-billing<?= $client_id ?>">
<div class="form-group">
<label>Hourly Rate</label>
@@ -200,7 +200,7 @@ ob_start();
</div>
<input type="text" class="form-control" inputmode="decimal"
pattern="[0-9]*\.?[0-9]{0,2}" name="rate" placeholder="0.00"
value="<?php echo number_format($client_rate, 2, '.', ''); ?>">
value="<?= number_format($client_rate, 2, '.', '') ?>">
</div>
</div>
@@ -215,8 +215,8 @@ ob_start();
<?php foreach ($net_terms_array as $net_term_value => $net_term_name) { ?>
<option <?php if ($net_term_value == $client_net_terms) {
echo "selected";
} ?> value="<?php echo $net_term_value; ?>">
<?php echo $net_term_name; ?>
} ?> value="<?= $net_term_value ?>">
<?= $net_term_name ?>
</option>
<?php } ?>
</select>
@@ -230,7 +230,7 @@ ob_start();
<span class="input-group-text"><i class="fa fa-fw fa-balance-scale"></i></span>
</div>
<input type="text" class="form-control" name="tax_id_number" maxlength="255"
placeholder="Tax ID Number" value="<?php echo $client_tax_id_number; ?>">
placeholder="Tax ID Number" value="<?= $client_tax_id_number ?>">
</div>
</div>
@@ -238,10 +238,10 @@ ob_start();
<?php } ?>
<div class="tab-pane fade" id="pills-client-notes<?php echo $client_id; ?>">
<div class="tab-pane fade" id="pills-client-notes<?= $client_id ?>">
<div class="form-group">
<textarea class="form-control" rows="10" placeholder="Enter some notes" name="notes"><?php echo $client_notes; ?></textarea>
<textarea class="form-control" rows="10" placeholder="Enter some notes" name="notes"><?= $client_notes ?></textarea>
</div>
</div>