mirror of
https://github.com/itflow-org/itflow
synced 2026-11-22 04:17:24 +00:00
46 lines
1.8 KiB
PHP
46 lines
1.8 KiB
PHP
<?php
|
|
// Configuration & core
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/config.php';
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/functions.php';
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/load_global_settings.php';
|
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/session_init.php';
|
|
|
|
// Set Timezone
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/inc_set_timezone.php';
|
|
|
|
$ip = escapeSql(getIP());
|
|
$user_agent = escapeSql(mb_substr((string) ($_SERVER['HTTP_USER_AGENT'] ?? ''), 0, 250)); // log_user_agent is varchar(250)
|
|
$os = escapeSql(getOS($user_agent));
|
|
$browser = escapeSql(getWebBrowser($user_agent));
|
|
|
|
// logAudit() reads these globals - without them guest audit rows have no IP
|
|
$session_ip = $ip;
|
|
$session_user_agent = $user_agent;
|
|
|
|
// Get Company Name
|
|
$sql = mysqli_query($mysqli, "SELECT company_name FROM companies WHERE company_id = 1");
|
|
$row = mysqli_fetch_assoc($sql);
|
|
|
|
$session_company_name = $row['company_name'];
|
|
|
|
// Page setup
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/page_title.php';
|
|
|
|
// Layout UI
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/guest/includes/guest_header.php';
|
|
|
|
// Wrapper & alerts
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/guest/includes/inc_wrapper.php';
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/inc_alert_feedback.php';
|
|
//require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/filter_header.php';
|
|
|
|
/*
|
|
* A guest page that can't go on - a link that isn't right, or something that
|
|
* can't be done here - said the same way on every guest page. The page then
|
|
* includes the footer and ends.
|
|
*/
|
|
function guestDeadEndHtml($icon, $title, $text) {
|
|
return '<div class="itflow-asset-empty mt-5"><i class="fas ' . $icon . ' fa-3x mb-3 opacity-50"></i><h1 class="h4">' . escapeHtml($title) . '</h1><p>' . escapeHtml($text) . '</p></div>';
|
|
}
|