Updating older low stock reporting report
Posted: Thu Jun 13, 2024 11:06 am
I am updating an older admin report that shows low product stocks. I cannot make any sense of the error. I am getting an error that stops the page loading which is
Here is the offending line of code
and here is the code block in its entirety.
Is there anyone that can help decipher the error to get the page working.
Code: Select all
[13-Jun-2024 11:00:36 UTC] PHP Parse error: syntax error, unexpected single-quoted string "<i class="fas fa-check-circle ..." in /home/####/public_html/####/stats_low_stock.php on line 170
Code: Select all
echo '<i class="fas fa-check-circle text-success"></i> <a href="' . Href::redirect($Linker->build('stats_low_stock.php', 'action=setflag&flag=0&pID=' . $products['products_id'] . '&cPath=' . ($cPath ?? null)) . '"><i class="fas fa-times-circle text-muted"></i></a>';
Code: Select all
<tr onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="document.location.href='<?php echo($url_newproduct); ?>'">
<td align="left"><?php echo $rows; ?>.</td>
<td><?php echo $prodmodel; ?></td>
<td><?php echo '<a href="' . $url_product . '" class="blacklink">' . $products['products_name'] . '</a>'; ?></td>
<td><?php echo $productsQty; ?></td>
<td>
<?php
if ($products['products_status'] == '1') {
echo '<i class="fas fa-check-circle text-success"></i> <a href="' . Href::redirect($Linker->build('stats_low_stock.php', 'action=setflag&flag=0&pID=' . $products['products_id'] . '&cPath=' . ($cPath ?? null)) . '"><i class="fas fa-times-circle text-muted"></i></a>';
} else {
echo '<a href="' . Href::redirect($Linker->build('stats_low_stock.php', 'action=setflag&flag=1&pID=' . $products['products_id'] . '&cPath=' . ($cPath ?? null) . '&page=' .$_GET['page'])) . '"><i class="fas fa-check-circle text-muted"></i></a> <i class="fas fa-times-circle text-danger"></i>';
}
?>
</td></tr>