mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
Started updating href paths to absolute paths instead of relative paths as itflow should be installed in document root anyway and not a sub-directory
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
// Check user is logged in with a valid session
|
||||
if (!isset($_SESSION['logged']) || !$_SESSION['logged']) {
|
||||
if ($_SERVER["REQUEST_URI"] == "/") {
|
||||
header("Location: ../login.php");
|
||||
header("Location: /login.php");
|
||||
} else {
|
||||
header("Location: ../login.php?last_visited=" . base64_encode($_SERVER["REQUEST_URI"]) );
|
||||
header("Location: /login.php?last_visited=" . base64_encode($_SERVER["REQUEST_URI"]) );
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -19,27 +19,27 @@ if (basename(dirname($_SERVER['REQUEST_URI'])) === 'admin') { ?>
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
|
||||
<!-- Bootstrap 4 -->
|
||||
<script src="../../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<!-- Custom js-->
|
||||
<script src="../../plugins/moment/moment.min.js"></script>
|
||||
<script src="../../plugins/chart.js/chart.umd.min.js"></script>
|
||||
<script src="../../plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
|
||||
<script src="../../plugins/daterangepicker/daterangepicker.js"></script>
|
||||
<script src="../../plugins/select2/js/select2.min.js"></script>
|
||||
<script src="../../plugins/inputmask/jquery.inputmask.min.js"></script>
|
||||
<script src="../../plugins/tinymce/tinymce.min.js" referrerpolicy="origin"></script>
|
||||
<script src="../../plugins/Show-Hide-Passwords-Bootstrap-4/bootstrap-show-password.min.js"></script>
|
||||
<script src="../../plugins/clipboardjs/clipboard.min.js"></script>
|
||||
<script src="../../js/keepalive.js"></script>
|
||||
<script src="../../plugins/DataTables/datatables.min.js"></script>
|
||||
<script src="../../plugins/intl-tel-input/js/intlTelInput.min.js"></script>
|
||||
<script src="/plugins/moment/moment.min.js"></script>
|
||||
<script src="/plugins/chart.js/chart.umd.min.js"></script>
|
||||
<script src="/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
|
||||
<script src="/plugins/daterangepicker/daterangepicker.js"></script>
|
||||
<script src="/plugins/select2/js/select2.min.js"></script>
|
||||
<script src="/plugins/inputmask/jquery.inputmask.min.js"></script>
|
||||
<script src="/plugins/tinymce/tinymce.min.js" referrerpolicy="origin"></script>
|
||||
<script src="/plugins/Show-Hide-Passwords-Bootstrap-4/bootstrap-show-password.min.js"></script>
|
||||
<script src="/plugins/clipboardjs/clipboard.min.js"></script>
|
||||
<script src="/js/keepalive.js"></script>
|
||||
<script src="/plugins/DataTables/datatables.min.js"></script>
|
||||
<script src="/plugins/intl-tel-input/js/intlTelInput.min.js"></script>
|
||||
|
||||
<!-- AdminLTE App -->
|
||||
<script src="../../plugins/adminlte/js/adminlte.min.js"></script>
|
||||
<script src="../../js/app.js"></script>
|
||||
<script src="../../js/ajax_modal.js"></script>
|
||||
<script src="../../js/confirm_modal.js"></script>
|
||||
<script src="/plugins/adminlte/js/adminlte.min.js"></script>
|
||||
<script src="/js/app.js"></script>
|
||||
<script src="/js/ajax_modal.js"></script>
|
||||
<script src="/js/confirm_modal.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -19,27 +19,27 @@ header("X-Frame-Options: DENY");
|
||||
<title><?= $session_company_name; ?></title>
|
||||
|
||||
<!-- Favicon -->
|
||||
<?php if(file_exists('../uploads/favicon.ico')): ?>
|
||||
<link rel="icon" type="image/x-icon" href="../../uploads/favicon.ico">
|
||||
<?php if(file_exists(__DIR__ . '../uploads/favicon.ico')): ?>
|
||||
<link rel="icon" type="image/x-icon" href="/uploads/favicon.ico">
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="../../plugins/fontawesome-free/css/all.min.css">
|
||||
<link rel="stylesheet" href="/plugins/fontawesome-free/css/all.min.css">
|
||||
|
||||
<!-- Custom Styles -->
|
||||
<link href="../../plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="../../plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="../../plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="../../plugins/daterangepicker/daterangepicker.css" rel="stylesheet">
|
||||
<link href="../../plugins/toastr/toastr.min.css" rel="stylesheet">
|
||||
<link href="../../plugins/DataTables/datatables.min.css" rel="stylesheet">
|
||||
<link href="../../plugins/intl-tel-input/css/intlTelInput.min.css" rel="stylesheet">
|
||||
<link href="../../css/itflow_custom.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="../../plugins/adminlte/css/adminlte.min.css">
|
||||
<link href="/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="/plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="/plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css" rel="stylesheet" type="text/css">
|
||||
<link href="/plugins/daterangepicker/daterangepicker.css" rel="stylesheet">
|
||||
<link href="/plugins/toastr/toastr.min.css" rel="stylesheet">
|
||||
<link href="/plugins/DataTables/datatables.min.css" rel="stylesheet">
|
||||
<link href="/plugins/intl-tel-input/css/intlTelInput.min.css" rel="stylesheet">
|
||||
<link href="/css/itflow_custom.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/plugins/adminlte/css/adminlte.min.css">
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="../../plugins/jquery/jquery.min.js"></script>
|
||||
<script src="../../plugins/toastr/toastr.min.js"></script>
|
||||
<script src="/plugins/jquery/jquery.min.js"></script>
|
||||
<script src="/plugins/toastr/toastr.min.js"></script>
|
||||
</head>
|
||||
<body class="
|
||||
hold-transition sidebar-mini layout-fixed layout-navbar-fixed
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<?php
|
||||
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
@@ -29,8 +29,7 @@ $user_config_theme_dark = intval($row['user_config_theme_dark']);
|
||||
if ($session_user_type !== 1) {
|
||||
session_unset();
|
||||
session_destroy();
|
||||
header("Location: ../login.php");
|
||||
exit;
|
||||
redirect("/client/login.php");
|
||||
}
|
||||
|
||||
// Load user client permissions
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script src="../../../js/app.js"></script>
|
||||
<script src="../../../plugins/Show-Hide-Passwords-Bootstrap-4/bootstrap-show-password.min.js"></script>
|
||||
<script src="/js/app.js"></script>
|
||||
<script src="/plugins/Show-Hide-Passwords-Bootstrap-4/bootstrap-show-password.min.js"></script>
|
||||
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
|
||||
@@ -5,18 +5,7 @@
|
||||
// Get the current page name without the .php extension
|
||||
$page_title = basename($_SERVER['PHP_SELF'], '.php');
|
||||
|
||||
// Remove 'client_' from the page name
|
||||
$page_title = str_replace('client_', '', $page_title);
|
||||
|
||||
// Remove 'report_' from the page name
|
||||
$page_title = str_replace('report_', '', $page_title);
|
||||
|
||||
// Remove 'admin_' from the page name
|
||||
$page_title = str_replace('admin_', '', $page_title);
|
||||
|
||||
// Remove 'admin_' from the page name
|
||||
$page_title = str_replace('settings_', '', $page_title);
|
||||
|
||||
// Lets make the Page title look pretty
|
||||
// Replace any underscores with spaces
|
||||
$page_title = str_replace('_', ' ', $page_title);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!isset($config_enable_setup) || $config_enable_setup == 1) {
|
||||
header("Location: /setup");
|
||||
exit;
|
||||
redirect("/setup");
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
// URI Router
|
||||
// Currently unused, but the idea is to dynamically prepend ../../ to asset paths (like includes, libraries, etc.)
|
||||
// based on the current directory depth. This allows us to support deeply nested folder structures.
|
||||
|
||||
$depth = min(substr_count(trim($_SERVER['REQUEST_URI'], '/'), '/'), 3);
|
||||
$path_prefix = str_repeat('../', $depth);
|
||||
@@ -12,7 +12,7 @@
|
||||
<ul class="navbar-nav ml-auto">
|
||||
|
||||
<!-- SEARCH FORM -->
|
||||
<form class="form-inline" action="../../agent/global_search.php">
|
||||
<form class="form-inline" action="/agent/global_search.php">
|
||||
<div class="input-group input-group-sm">
|
||||
<input class="form-control form-control-navbar" type="search" placeholder="Search everywhere" name="query"
|
||||
value="<?php if (isset($_GET['query'])) { echo nullable_htmlentities($_GET['query']); } ?>">
|
||||
@@ -64,7 +64,7 @@
|
||||
?>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link ajax-modal" href="#" data-modal-url="../../modals/notifications.php">
|
||||
<a class="nav-link ajax-modal" href="#" data-modal-url="/modals/notifications.php">
|
||||
<i class="fas fa-bell"></i>
|
||||
<?php if ($num_notifications) { ?>
|
||||
<span class="badge badge-light badge-pill navbar-badge position-absolute" style="top: 1px; right: 3px;">
|
||||
@@ -79,7 +79,7 @@
|
||||
<?php if (empty($session_avatar)) { ?>
|
||||
<i class="fas fa-user-circle mr-1"></i>
|
||||
<?php }else{ ?>
|
||||
<img src="<?php echo "../../uploads/users/$session_user_id/$session_avatar"; ?>"
|
||||
<img src="<?php echo "/uploads/users/$session_user_id/$session_avatar"; ?>"
|
||||
class="user-image img-circle">
|
||||
<?php } ?>
|
||||
<span
|
||||
@@ -92,7 +92,7 @@
|
||||
<i class="fas fa-user-circle fa-6x"></i>
|
||||
<?php }else{ ?>
|
||||
|
||||
<img src="<?php echo "../../uploads/users/$session_user_id/$session_avatar"; ?>" class="img-circle">
|
||||
<img src="<?php echo "/uploads/users/$session_user_id/$session_avatar"; ?>" class="img-circle">
|
||||
<?php } ?>
|
||||
<p>
|
||||
<?php echo stripslashes(nullable_htmlentities($session_name)); ?>
|
||||
@@ -102,10 +102,10 @@
|
||||
<!-- Menu Footer-->
|
||||
<li class="user-footer">
|
||||
<?php if ($session_is_admin) { ?>
|
||||
<a href="../../admin" class="btn btn-default btn-block btn-flat mb-2"><i class="fas fa-user-shield mr-2"></i>Administration</a>
|
||||
<a href="/admin" class="btn btn-default btn-block btn-flat mb-2"><i class="fas fa-user-shield mr-2"></i>Administration</a>
|
||||
<?php } ?>
|
||||
<a href="../../agent/user/user_details.php" class="btn btn-default btn-flat"><i class="fas fa-user-cog mr-2"></i>Account</a>
|
||||
<a href="post.php?logout" class="btn btn-default btn-flat float-right"><i class="fas fa-sign-out-alt mr-2"></i>Logout</a>
|
||||
<a href="/agent/user/user_details.php" class="btn btn-default btn-flat"><i class="fas fa-user-cog mr-2"></i>Account</a>
|
||||
<a href="/agent/post.php?logout" class="btn btn-default btn-flat float-right"><i class="fas fa-sign-out-alt mr-2"></i>Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user