mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +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:
45
agent/custom/includes/custom_side_nav.php
Normal file
45
agent/custom/includes/custom_side_nav.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<!-- Main Sidebar Container -->
|
||||
<aside class="main-sidebar sidebar-dark-primary d-print-none">
|
||||
|
||||
<a class="pb-1 mt-1 brand-link" href="../<?php echo $config_start_page ?>">
|
||||
<p class="h5"><i class="nav-icon fas fa-arrow-left ml-3 mr-2"></i>
|
||||
<span class="brand-text ">Back | <strong>Custom</strong>
|
||||
</p>
|
||||
</a>
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<nav>
|
||||
|
||||
<ul class="nav nav-pills nav-sidebar flex-column mt-2" data-widget="treeview" data-accordion="false">
|
||||
|
||||
<li class="nav-header">CUSTOM HEADER</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="index.php" class="nav-link <?php if (basename($_SERVER["PHP_SELF"]) == "index.php") { echo "active"; } ?>">
|
||||
<i class="far fa-circle nav-icon"></i>
|
||||
<p>custom</p>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<!-- /.sidebar-menu -->
|
||||
|
||||
<div class="sidebar-custom mb-3">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
13
agent/custom/includes/inc_all_custom.php
Normal file
13
agent/custom/includes/inc_all_custom.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
require_once "../../config.php";
|
||||
require_once "../../functions.php";
|
||||
require_once "../../includes/check_login.php";
|
||||
require_once "../../includes/page_title.php";
|
||||
require_once "../../includes/header.php";
|
||||
require_once "../../includes/top_nav.php";
|
||||
require_once "includes/custom_side_nav.php";
|
||||
require_once "../../includes/inc_wrapper.php";
|
||||
require_once "../../includes/inc_alert_feedback.php";
|
||||
require_once "../../includes/filter_header.php";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php require_once "includes/inc_all.php"; ?>
|
||||
<?php require_once "includes/inc_all_custom.php"; ?>
|
||||
|
||||
<!-- Breadcrumbs-->
|
||||
<ol class="breadcrumb">
|
||||
@@ -69,4 +69,4 @@ echo "Current Date and Time: <strong>$date_time</strong>";
|
||||
|
||||
<script>toastr.success('Have Fun Wozz!!')</script>
|
||||
|
||||
<?php require_once "../includes/footer.php";
|
||||
<?php require_once "../../includes/footer.php";
|
||||
|
||||
46
agent/custom/post.php
Normal file
46
agent/custom/post.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* ITFlow - User GET/POST request handler
|
||||
*/
|
||||
|
||||
require_once "../../config.php";
|
||||
require_once "../../functions.php";
|
||||
require_once "../../includes/check_login.php";
|
||||
|
||||
// Define a variable that we can use to only allow running post files via inclusion (prevents people/bots poking them)
|
||||
define('FROM_POST_HANDLER', true);
|
||||
|
||||
|
||||
// Determine which files we should load
|
||||
|
||||
// Parse URL & get the path
|
||||
$path = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_PATH);
|
||||
|
||||
// Get the base name (the page name)
|
||||
$module = explode(".", basename($path))[0];
|
||||
|
||||
// Strip off any _details bits
|
||||
$module = str_ireplace('_details', '', $module);
|
||||
|
||||
// Dynamically load admin-related module POST logic
|
||||
|
||||
// Load all module POST logic
|
||||
// Loads everything in post/user/
|
||||
// Eventually, it would be nice to only specifically load what we need like we do for admins
|
||||
|
||||
foreach (glob("post/*.php") as $user_module) {
|
||||
if (!preg_match('/_model\.php$/', basename($user_module))) {
|
||||
require_once $user_module;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Logout is the same for user and admin
|
||||
require_once "../../post/logout.php";
|
||||
|
||||
// TODO: Find a home for these
|
||||
|
||||
require_once "../../post/ai.php";
|
||||
require_once "../../post/misc.php";
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|
||||
- Custom Pages -
|
||||
|
||||
If you wish to add custom pages to ITFlow, add them to this directory"
|
||||
|
||||
*/
|
||||
@@ -2,7 +2,6 @@
|
||||
// Configuration & core
|
||||
require_once "../config.php";
|
||||
require_once "../functions.php";
|
||||
require_once "../includes/router.php";
|
||||
require_once "../includes/check_login.php";
|
||||
|
||||
// Page setup
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
require_once "../config.php";
|
||||
require_once "../functions.php";
|
||||
require_once "../includes/router.php";
|
||||
require_once "../includes/check_login.php";
|
||||
require_once "../includes/page_title.php";
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
require_once "../../config.php";
|
||||
require_once "../../functions.php";
|
||||
require_once "../../includes/router.php";
|
||||
require_once "../../includes/check_login.php";
|
||||
require_once "../../includes/page_title.php";
|
||||
// Reporting Perms
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- Main Sidebar Container -->
|
||||
<aside class="main-sidebar sidebar-dark-primary d-print-none">
|
||||
|
||||
<a class="pb-1 mt-1 brand-link" href="../../agent/<?php echo $config_start_page ?>">
|
||||
<a class="pb-1 mt-1 brand-link" href="../<?php echo $config_start_page ?>">
|
||||
<p class="h5"><i class="nav-icon fas fa-arrow-left ml-3 mr-2"></i>
|
||||
<span class="brand-text ">Back | <strong>Reports</strong>
|
||||
</p>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
require_once "../../config.php";
|
||||
require_once "../../functions.php";
|
||||
require_once "../../includes/router.php";
|
||||
require_once "../../includes/check_login.php";
|
||||
require_once "../../includes/page_title.php";
|
||||
require_once "../../includes/header.php";
|
||||
|
||||
Reference in New Issue
Block a user