mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
Update constructs to not have parenthesis.
This commit is contained in:
@@ -4,10 +4,12 @@ header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
require_once("guest_header.php");
|
||||
require_once "guest_header.php";
|
||||
|
||||
|
||||
//Initialize the HTML Purifier to prevent XSS
|
||||
require("plugins/htmlpurifier/HTMLPurifier.standalone.php");
|
||||
require "plugins/htmlpurifier/HTMLPurifier.standalone.php";
|
||||
|
||||
$purifier_config = HTMLPurifier_Config::createDefault();
|
||||
$purifier_config->set('URI.AllowedSchemes', ['data' => true, 'src' => true, 'http' => true, 'https' => true]);
|
||||
$purifier = new HTMLPurifier($purifier_config);
|
||||
@@ -35,7 +37,8 @@ $currency_format = numfmt_create($company_locale, NumberFormatter::CURRENCY);
|
||||
<?php
|
||||
if (!isset($_GET['id']) || !isset($_GET['key'])) {
|
||||
echo "<div class='alert alert-danger'>Incorrect URL.</div>";
|
||||
include("guest_footer.php");
|
||||
include "guest_footer.php";
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -48,14 +51,16 @@ $row = mysqli_fetch_array($sql);
|
||||
// Check we got a result
|
||||
if (mysqli_num_rows($sql) !== 1 || !$row) {
|
||||
echo "<div class='alert alert-danger' >No item to view. Check with the person that sent you this link to ensure it is correct and has not expired.</div>";
|
||||
include("guest_footer.php");
|
||||
include "guest_footer.php";
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
// Check item share is active & hasn't been viewed too many times but allow 0 views as that is consider infinite views
|
||||
if ($row['item_active'] !== "1" || ($row['item_view_limit'] > 0 && $row['item_views'] >= $row['item_view_limit'])) {
|
||||
echo "<div class='alert alert-danger'>Item cannot be viewed at this time. Check with the person that sent you this link to ensure it is correct and has not expired.</div>";
|
||||
include("guest_footer.php");
|
||||
include "guest_footer.php";
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -91,7 +96,8 @@ if ($item_type == "Document") {
|
||||
|
||||
if (mysqli_num_rows($doc_sql) !== 1 || !$doc_row) {
|
||||
echo "<div class='alert alert-danger'>Error retrieving document to view.</div>";
|
||||
require_once("guest_footer.php");
|
||||
require_once "guest_footer.php";
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -116,7 +122,8 @@ if ($item_type == "Document") {
|
||||
|
||||
if (mysqli_num_rows($file_sql) !== 1 || !$file_row) {
|
||||
echo "<div class='alert alert-danger'>Error retrieving file.</div>";
|
||||
include("guest_footer.php");
|
||||
include "guest_footer.php";
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -136,7 +143,8 @@ if ($item_type == "Document") {
|
||||
$login_row = mysqli_fetch_array($login_sql);
|
||||
if (mysqli_num_rows($login_sql) !== 1 || !$login_row) {
|
||||
echo "<div class='alert alert-danger'>Error retrieving login.</div>";
|
||||
include("guest_footer.php");
|
||||
include "guest_footer.php";
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -233,5 +241,6 @@ if ($item_type == "Document") {
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require_once("guest_footer.php");
|
||||
require_once "guest_footer.php";
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user