Added getPath function
This commit is contained in:
parent
6c4237ec9b
commit
cc5474ef80
@ -65,6 +65,9 @@
|
||||
$varMimeTypes = array(
|
||||
array("/\.css$/", "text/css"),
|
||||
array("/\.js$/", "application/javascript"),
|
||||
array("/\.png$/", "image/png"),
|
||||
array("/\.jpg$/", "image/jpeg"),
|
||||
array("/\.jpeg$/", "image/jpeg"),
|
||||
);
|
||||
|
||||
foreach ($varMimeTypes as $varMimeType)
|
||||
@ -126,12 +129,15 @@
|
||||
requireAll("init.php");
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<?php requireAll("head.php"); ?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body data-path="<?= Request::getPath(); ?>">
|
||||
<div class="app">
|
||||
<div class="app-header">
|
||||
<?php requireAll("header.php"); ?>
|
||||
</div>
|
||||
@ -166,6 +172,7 @@
|
||||
<div class="app-footer">
|
||||
<?php requireAll("footer.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -98,6 +98,13 @@
|
||||
return Request::$varPathParts;
|
||||
}
|
||||
|
||||
public static function getPath()
|
||||
{
|
||||
$strPath = "/";
|
||||
$strPath .= implode("/", Request::getPathParts());
|
||||
return $strPath;
|
||||
}
|
||||
|
||||
// Safely returns a request argument by its index or null if it doesn't exist (without error)
|
||||
public static function getArg($intIndex)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user