Compare commits
No commits in common. "master" and "code_docs" have entirely different histories.
@ -1,67 +0,0 @@
|
|||||||
<?php
|
|
||||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
|
||||||
?>
|
|
||||||
|
|
||||||
<h1>Authors</h1>
|
|
||||||
<nav id="body_nav" class="jmenu">
|
|
||||||
<div class="pmenu">
|
|
||||||
|
|
||||||
<ul><li><a href=/>Home</a></li></ul>
|
|
||||||
<?php
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/get_month_name.php');
|
|
||||||
|
|
||||||
//Removes the number used to keep articles in post order from the displayed title.
|
|
||||||
function remove_sorting_number($link_title){
|
|
||||||
$first_three = mb_substr($link_title, 0, 3,"UTF-8");
|
|
||||||
|
|
||||||
if ( preg_match( '/[0-9][0-9] /', $first_three) ){
|
|
||||||
$link_title = mb_substr($link_title,3);
|
|
||||||
}
|
|
||||||
return $link_title;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$dir = '.';
|
|
||||||
// Check if the directory exists
|
|
||||||
if (file_exists($dir) && is_dir($dir) ) {
|
|
||||||
// Get the files of the directory as an array
|
|
||||||
$scan_arr = scandir($dir);
|
|
||||||
$files_arr = array_diff($scan_arr, array('.','..','index.php','common','.htaccess') );
|
|
||||||
// echo "<pre>"; print_r( $files_arr ); echo "</pre>";
|
|
||||||
// Get each files of our directory with line break
|
|
||||||
foreach ($files_arr as $file) {
|
|
||||||
//Get the file path
|
|
||||||
$file_path = "./".$file;
|
|
||||||
// Get the file extension
|
|
||||||
$file_ext = pathinfo($file_path, PATHINFO_EXTENSION);
|
|
||||||
if ($file_ext == "") {
|
|
||||||
$file_array[] = $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (sizeof($file_array) != 0){
|
|
||||||
foreach($file_array as $file) {//Renders the folder names as more readable titles.
|
|
||||||
$link_title = str_replace('_',' ',$file);//Remove undersores and replace them with spaces
|
|
||||||
$link_title = str_replace($_replace,'',$link_title);
|
|
||||||
if (file_exists($file."/pfp.png")){
|
|
||||||
$pfp_path = "$file/pfp.png";
|
|
||||||
echo("<ul><li><img src=\"$pfp_path\" class=\"pfp-small\" name=\"$file pfp\"><a href='$file'> $link_title </a></li></ul>\n");//Output the result.
|
|
||||||
} else {
|
|
||||||
echo("<ul><li><a href='$file'> $link_title </a></li></ul>\n");//Output the result.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
echo "<ul><li><a>No Authors<a></li></ul>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo "Directory does not exists";
|
|
||||||
}
|
|
||||||
echo("<ul><li><a href='..'>Back</a></li></ul>\n");
|
|
||||||
?>
|
|
||||||
</div><!--end of pmenu-->
|
|
||||||
</nav>
|
|
||||||
<br>
|
|
||||||
<?php
|
|
||||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
|
|
||||||
?>
|
|
64
blog/by_tag/index.php
Executable file → Normal file
64
blog/by_tag/index.php
Executable file → Normal file
@ -1,14 +1,39 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||||
|
|
||||||
echo "<article><h1 id=\"page_title\">Posts by Tag</h1></article>";
|
echo "<article><h1 id=\"page_title\">Posts by Tag</h1></article>";
|
||||||
echo "<div id=\"search_inputs\"><input type=\"text\" id=\"tag_sort\" onkeyup=\"tag_search()\" placeholder=\"Search Tags...\" title=\"Type a tage to search\"><input id=\"search_toggle\" type=\"button\" value=\"Search Titles\" onclick=\"search_toggle()\"></div><!--End Div Search Inputs-->";
|
echo "<div id=\"search_inputs\"><input type=\"text\" id=\"tag_sort\" onkeyup=\"tag_search()\" placeholder=\"Search Tags...\" title=\"Type a tage to search\"><input id=\"search_toggle\" type=\"button\" value=\"Search Titles\" onclick=\"search_toggle()\"></div><!--End Div Search Inputs-->";
|
||||||
function read_tags($tags_file){
|
|
||||||
if (filesize($tags_file) == 0){
|
//if(file_exists("tags.csv")){
|
||||||
echo "<br/>\n<br/>";
|
//echo "<ul id=\"tag_menu\">\n";
|
||||||
return;
|
//$csv = array_map('str_getcsv', file("tags.csv"));
|
||||||
}
|
//array_walk($csv, function(&$a) use ($csv) {
|
||||||
|
//$a = array_combine($csv[0], $a);
|
||||||
|
//});
|
||||||
|
//array_shift($csv); # remove column header
|
||||||
|
//foreach ($csv as $row){
|
||||||
|
//$counter = 0;
|
||||||
|
//foreach ($row as $item){
|
||||||
|
//$counter++;
|
||||||
|
//if ($counter == 1){
|
||||||
|
//echo "\t<li id=\"" . $item . "\">" . $item . " <a id=\"" . $item . "\"></a>\n";
|
||||||
|
//} elseif ($counter % 2 == 0) {
|
||||||
|
//if ($item == ""){
|
||||||
|
//break;
|
||||||
|
//} else {
|
||||||
|
//echo "\t\t<ol><a href=\"" . $item . "\">";
|
||||||
|
//}
|
||||||
|
//} elseif ($counter % 2 != 0) {
|
||||||
|
//echo $item . "</a></ol>\n";
|
||||||
|
//}
|
||||||
|
//}
|
||||||
|
//echo "\t</li>\n";
|
||||||
|
//}
|
||||||
|
//echo "</ul>\n";
|
||||||
|
//}
|
||||||
|
|
||||||
|
# Tags rewrite
|
||||||
$tags_csv = array_map('str_getcsv', file('tags.csv'));
|
$tags_csv = array_map('str_getcsv', file('tags.csv'));
|
||||||
$tags_rows = sizeof($tags_csv);
|
$tags_rows = sizeof($tags_csv);
|
||||||
$tags_coloums = sizeof($tags_csv[0]);
|
$tags_coloums = sizeof($tags_csv[0]);
|
||||||
@ -18,12 +43,12 @@
|
|||||||
//echo "</pre>\n";
|
//echo "</pre>\n";
|
||||||
echo "<ul id=\"tag_menu\">\n";
|
echo "<ul id=\"tag_menu\">\n";
|
||||||
$coloum_number = 0;
|
$coloum_number = 0;
|
||||||
for ($row_number = 0; $row_number <= $tags_coloums; $row_number++){
|
for ($row_number = 0; $row_number < $tags_rows; $row_number++){
|
||||||
//echo $row_number;
|
#echo $row_number;
|
||||||
$section_title = $tags_csv[0][$coloum_number];
|
$section_title = $tags_csv[0][$coloum_number];
|
||||||
echo "\t<li id=\"" . $section_title . "\"><b>" . $section_title . " </b>\n";
|
echo "\t<li id=\"" . $section_title . "\"><b>" . $section_title . " </b>\n";
|
||||||
for ($row = 1; $row < $tags_coloums; $row++){
|
for ($row = 1; $row < $tags_coloums; $row++){
|
||||||
//echo "rn: " . $row . "\ncn:" . $coloum_number ." ";
|
#echo "rn: " . $row_number . "\ncn:" . $coloum_number;
|
||||||
$tag_content = $tags_csv[$row][$coloum_number];
|
$tag_content = $tags_csv[$row][$coloum_number];
|
||||||
if ($tag_content == ""){
|
if ($tag_content == ""){
|
||||||
break;
|
break;
|
||||||
@ -39,22 +64,5 @@
|
|||||||
$coloum_number++;
|
$coloum_number++;
|
||||||
}
|
}
|
||||||
echo "</ul>\n";
|
echo "</ul>\n";
|
||||||
}
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');
|
||||||
|
|
||||||
|
|
||||||
# Tags rewrite
|
|
||||||
if (file_exists('tags.csv')){
|
|
||||||
read_tags('tags.csv');
|
|
||||||
} elseif( file_exists('tags.csv.bak') ){
|
|
||||||
if (copy('tags.csv.bak', './tags.csv')) {
|
|
||||||
read_tags('tags.csv');
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
$empty_csv = fopen("tags.csv", "w") or die("Cannot write new tags.csv file.");
|
|
||||||
fwrite($empty_csv, "");
|
|
||||||
fclose($empty_csv);
|
|
||||||
chmod('./tags.csv', 0666);
|
|
||||||
read_tags('tags.csv');
|
|
||||||
}
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
//The common file used to render pages on the blog.
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
|
||||||
//Looks for an article.md to see if the current directory is an article or not
|
|
||||||
//If it is not then it is a menu page.
|
|
||||||
echo "<article>";
|
|
||||||
if (file_exists('byline.md')){
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/md_read.php');
|
|
||||||
echo read_md('byline.md');
|
|
||||||
}
|
|
||||||
if (file_exists('author.md')){
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/md_read.php');
|
|
||||||
echo read_md('author.md');
|
|
||||||
}
|
|
||||||
echo "</article>";
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
|
|
||||||
?>
|
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"require": {
|
"require": {
|
||||||
|
"erusev/parsedown": "^1.7",
|
||||||
"erusev/parsedown-extra": "^0.8.1"
|
"erusev/parsedown-extra": "^0.8.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
20
common/composer.lock
generated
20
common/composer.lock
generated
@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
"_readme": [
|
"_readme": [
|
||||||
"This file locks the dependencies of your project to a known state",
|
"This file locks the dependencies of your project to a known state",
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "ab175e79f029b7846e324d73005f0a67",
|
"hash": "aa5767a5b8fb16d5e73cc5639dd2604b",
|
||||||
|
"content-hash": "0b5aa77427c5746d4d87e5e921804d34",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "erusev/parsedown",
|
"name": "erusev/parsedown",
|
||||||
@ -50,11 +51,7 @@
|
|||||||
"markdown",
|
"markdown",
|
||||||
"parser"
|
"parser"
|
||||||
],
|
],
|
||||||
"support": {
|
"time": "2019-12-30 22:54:17"
|
||||||
"issues": "https://github.com/erusev/parsedown/issues",
|
|
||||||
"source": "https://github.com/erusev/parsedown/tree/1.7.x"
|
|
||||||
},
|
|
||||||
"time": "2019-12-30T22:54:17+00:00"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "erusev/parsedown-extra",
|
"name": "erusev/parsedown-extra",
|
||||||
@ -101,11 +98,7 @@
|
|||||||
"parsedown",
|
"parsedown",
|
||||||
"parser"
|
"parser"
|
||||||
],
|
],
|
||||||
"support": {
|
"time": "2019-12-30 23:20:37"
|
||||||
"issues": "https://github.com/erusev/parsedown-extra/issues",
|
|
||||||
"source": "https://github.com/erusev/parsedown-extra/tree/0.8.x"
|
|
||||||
},
|
|
||||||
"time": "2019-12-30T23:20:37+00:00"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
@ -115,6 +108,5 @@
|
|||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": [],
|
"platform": [],
|
||||||
"platform-dev": [],
|
"platform-dev": []
|
||||||
"plugin-api-version": "2.0.0"
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/header.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/menu.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||||
?>
|
?>
|
||||||
<h1 align="center">Error 403</h1>
|
<h1 align="center">Error 403</h1>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@ -11,4 +11,4 @@ include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/menu.php');
|
|||||||
<br/>
|
<br/>
|
||||||
You're not allowed here. Stop that.<br/>
|
You're not allowed here. Stop that.<br/>
|
||||||
</p>
|
</p>
|
||||||
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/footer.php');?>
|
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');?>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/header.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/menu.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||||
?>
|
?>
|
||||||
<h1 align="center">Error 404</h1>
|
<h1 align="center">Error 404</h1>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@ -21,4 +21,4 @@ include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/menu.php');
|
|||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/footer.php');?>
|
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');?>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/header.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/menu.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||||
?>
|
?>
|
||||||
<h1 align="center">Error 500</h1>
|
<h1 align="center">Error 500</h1>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<br/>
|
<br/>
|
||||||
We done made a boo boo...<br/>
|
We done made a boo boo...<br/>
|
||||||
</p>
|
</p>
|
||||||
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/footer.php');?>
|
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');?>
|
||||||
|
79
common/gallery.css
Normal file
79
common/gallery.css
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
/* Style the Image Used to Trigger the Modal */
|
||||||
|
#myImg {
|
||||||
|
border-radius: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
img:hover {opacity: 0.7;}
|
||||||
|
|
||||||
|
/* The Modal (background) */
|
||||||
|
.modal_gal {
|
||||||
|
display: none; /* Hidden by default */
|
||||||
|
position: fixed; /* Stay in place */
|
||||||
|
z-index: 1; /* Sit on top */
|
||||||
|
padding-top: 100px; /* Location of the box */
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%; /* Full width */
|
||||||
|
height: 100%; /* Full height */
|
||||||
|
overflow: auto; /* Enable scroll if needed */
|
||||||
|
background-color: rgb(0,0,0); /* Fallback color */
|
||||||
|
background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Modal Content (Image) */
|
||||||
|
.gallery_img {
|
||||||
|
margin: auto;
|
||||||
|
display: block;
|
||||||
|
width: 80%;
|
||||||
|
max-width: 700px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Caption of Modal Image (Image Text) - Same Width as the Image */
|
||||||
|
#modal_img_caption {
|
||||||
|
margin: auto;
|
||||||
|
display: block;
|
||||||
|
width: 80%;
|
||||||
|
max-width: 700px;
|
||||||
|
text-align: center;
|
||||||
|
color: #ccc;
|
||||||
|
padding: 10px 0;
|
||||||
|
height: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Add Animation - Zoom in the Modal */
|
||||||
|
.gallery_img, #caption {
|
||||||
|
animation-name: zoom;
|
||||||
|
animation-duration: 0.6s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes zoom {
|
||||||
|
from {transform:scale(0)}
|
||||||
|
to {transform:scale(1)}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The Close Button */
|
||||||
|
.close_modal {
|
||||||
|
position: absolute;
|
||||||
|
top: 15px;
|
||||||
|
right: 35px;
|
||||||
|
color: #00cc00;
|
||||||
|
font-size: 40px;
|
||||||
|
font-weight: bold;
|
||||||
|
transition: 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close_modal:hover,
|
||||||
|
.close_modal:focus {
|
||||||
|
color: #bbb;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 100% Image Width on Smaller Screens */
|
||||||
|
@media only screen and (max-width: 700px){
|
||||||
|
.gallery_img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
32
common/gallery.js
Normal file
32
common/gallery.js
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
var modalEle = document.querySelector(".modal_gal");
|
||||||
|
var modalImage = document.querySelector(".gallery_img");
|
||||||
|
Array.from(document.querySelectorAll(".img_thumb")).forEach(item => {
|
||||||
|
item.addEventListener("click", event => {
|
||||||
|
modalEle.style.display = "block";
|
||||||
|
modalImage.src = event.target.src;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
document.querySelector(".close").addEventListener("click", () => {
|
||||||
|
modalEle.style.display = "none";
|
||||||
|
});
|
||||||
|
|
||||||
|
function image_modal(document){
|
||||||
|
// Get the modal
|
||||||
|
var modal = document.getElementById("modal_gallery");
|
||||||
|
// Get the image and insert it inside the modal - use its "alt" text as a caption
|
||||||
|
var img = document.getElementById("myImg");
|
||||||
|
var modalImg = document.getElementById("modal_img");
|
||||||
|
var captionText = document.getElementById("modal_img_caption");
|
||||||
|
img.onclick = function(){
|
||||||
|
modal.style.display = "block";
|
||||||
|
modalImg.src = this.src;
|
||||||
|
captionText.innerHTML = this.alt;
|
||||||
|
}
|
||||||
|
// Get the <span> element that closes the modal
|
||||||
|
var span = document.getElementsByClassName("close_modal")[0];
|
||||||
|
|
||||||
|
// When the user clicks on <span> (x), close the modal
|
||||||
|
span.onclick = function() {
|
||||||
|
modal.style.display = "none";
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
//Sets the proper level 1 heading for the folder.
|
//Sets the proper level 1 heading for the folder.
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/get_month_name.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/get_month_name.php');
|
||||||
$current_dir = basename(getcwd());
|
$current_dir = basename(getcwd());
|
||||||
$named_month = get_month_name($current_dir);
|
$named_month = get_month_name($current_dir);
|
||||||
if ( $named_month == "blog") {
|
if ( $named_month == "blog") {
|
@ -2,11 +2,20 @@
|
|||||||
<html lang="en-US">
|
<html lang="en-US">
|
||||||
<?php
|
<?php
|
||||||
//Sets the page title based on the name of the current directory
|
//Sets the page title based on the name of the current directory
|
||||||
function Title() {
|
function Title() {//Needs cleanup.
|
||||||
|
//~ $new_title = $_SERVER['REQUEST_URI'];
|
||||||
|
|
||||||
|
//~ $new_title = preg_replace("/^^\//i", "", $new_title);
|
||||||
|
//~ $new_title = preg_replace("/\//i", "", $new_title);
|
||||||
|
//~ $page_title = $_SERVER['REQUEST_URI'];
|
||||||
|
//~ $page_title = preg_replace("/^(.*)\//i", "", $page_title);
|
||||||
$page_title = basename($_SERVER['SCRIPT_FILENAME'], '.php');
|
$page_title = basename($_SERVER['SCRIPT_FILENAME'], '.php');
|
||||||
|
//~ echo($page_title);
|
||||||
if(strtolower($page_title) == 'index'){
|
if(strtolower($page_title) == 'index'){
|
||||||
parse_str($_SERVER['REQUEST_URI'], $page_uri);
|
parse_str($_SERVER['REQUEST_URI'], $page_uri);
|
||||||
$page_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
$page_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||||
|
//~ echo($page_path);
|
||||||
|
//~ $folder_name = sizeof($page_path);
|
||||||
$folder_name = explode("/", trim($page_path, "/"));
|
$folder_name = explode("/", trim($page_path, "/"));
|
||||||
$page_title = $folder_name[(sizeof($folder_name) - 1)];
|
$page_title = $folder_name[(sizeof($folder_name) - 1)];
|
||||||
} elseif(strtolower($page_title) == 'homepage'){
|
} elseif(strtolower($page_title) == 'homepage'){
|
||||||
@ -19,8 +28,7 @@
|
|||||||
?>
|
?>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
||||||
<?php
|
<?php//If a tags file is present parse it and add any tags found to the renderd page's metadata.
|
||||||
//If a tags file is present parse it and add any tags found to the renderd page's metadata.
|
|
||||||
if(file_exists('tags')){
|
if(file_exists('tags')){
|
||||||
$tag_data_raw = fopen('tags',"r");
|
$tag_data_raw = fopen('tags',"r");
|
||||||
$tag_data = fread($tag_data_raw, filesize('tags'));
|
$tag_data = fread($tag_data_raw, filesize('tags'));
|
||||||
@ -31,10 +39,10 @@
|
|||||||
?>
|
?>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<title><?php $title = Title(); echo $title;?></title>
|
<title><?php $title = Title(); echo $title;?></title>
|
||||||
<link href="/common/css/styles.css?v=<?php echo date('his'); ?>" type="text/css" rel="stylesheet"/>
|
<link href="/common/styles.css?v=<?php echo date('his'); ?>" type="text/css" rel="stylesheet"/>
|
||||||
<link href="/common/css/jmenu.css?v=<?php echo date('his'); ?>" type="text/css" rel="stylesheet"/>
|
<link href="/common/jmenu.css?v=<?php echo date('his'); ?>" type="text/css" rel="stylesheet"/>
|
||||||
<link href="/common/css/print.css?v=<?php echo date('his'); ?>" type="text/css" media="print" rel="stylesheet"/>
|
<link href="/common/print.css?v=<?php echo date('his'); ?>" type="text/css" media="print" rel="stylesheet"/>
|
||||||
<script type="text/javascript" src="/common/js/page_format.js?v=<?php echo date('his'); ?>"></script>
|
<script type="text/javascript" src="/common/page_format.js?v=<?php echo date('his'); ?>"></script>
|
||||||
</head>
|
</head>
|
||||||
<body lang="en-US">
|
<body lang="en-US">
|
||||||
<div class="body" id="body">
|
<div class="body" id="body">
|
14
common/index.php
Normal file
14
common/index.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
//The common file used to render pages on the blog.
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||||
|
//Looks for an article.md to see if the current directory is an article or not
|
||||||
|
//If it is not then it is a menu page.
|
||||||
|
if (file_exists('article.md')){
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/md_read.php');
|
||||||
|
} else {
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/h1_month.php');
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/page_menu.php');
|
||||||
|
}
|
||||||
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');
|
||||||
|
?>
|
@ -1,5 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/md_read.php');
|
#Markdown parser dependancy
|
||||||
|
require ($_SERVER['DOCUMENT_ROOT'].'/common/vendor/autoload.php');
|
||||||
|
#Markdown parseing code.
|
||||||
|
$MD_Parser = new ParsedownExtra();
|
||||||
|
$MD_Path = "article.md";
|
||||||
|
$MD_File = fopen($MD_Path, "r") or die("File not found.");
|
||||||
|
$MD_Text = fread($MD_File, filesize($MD_Path));
|
||||||
echo "<article id=\"article\">\n" . /* Adds the option to change the font size of the article text. */
|
echo "<article id=\"article\">\n" . /* Adds the option to change the font size of the article text. */
|
||||||
"<div id=\"font_btns\">
|
"<div id=\"font_btns\">
|
||||||
Text Size:
|
Text Size:
|
||||||
@ -18,22 +24,10 @@
|
|||||||
<li><a href=\"article.md\" title=\"Download \">MD</a></li>
|
<li><a href=\"article.md\" title=\"Download \">MD</a></li>
|
||||||
</nav>
|
</nav>
|
||||||
".
|
".
|
||||||
read_md("article.md") . "\n</article>";
|
$MD_Parser->text($MD_Text) . "\n</article>";
|
||||||
|
fclose($MD_File);
|
||||||
echo "\n</div><!--End of print-content div-->\n";
|
echo "\n</div><!--End of print-content div-->\n";
|
||||||
echo("<nav class=\"jmenu\"><div class=\"pmenu\"><ul id=\"back_btn\"><li><a href='..'>Back</a></li></ul></div></nav>\n");
|
echo("<nav class=\"jmenu\"><div class=\"pmenu\"><ul id=\"back_btn\"><li><a href='..'>Back</a></li></ul></div></nav>\n");
|
||||||
if (file_exists('author') && (filesize('author') != 0)){
|
|
||||||
$author_name_raw = fopen('author', 'r');
|
|
||||||
$author_name = fread($author_name_raw, filesize('author'));
|
|
||||||
$author_name = str_replace("\n", "", $author_name);
|
|
||||||
$byline_path = $_SERVER['DOCUMENT_ROOT'].'blog/authors/'.$author_name.'/byline.md';
|
|
||||||
if (file_exists($byline_path)){
|
|
||||||
echo "<div class =\"byline\">\n"
|
|
||||||
. read_md($byline_path)
|
|
||||||
."</div><!--End byline div-->\n";
|
|
||||||
}
|
|
||||||
fclose($author_name_raw);
|
|
||||||
}
|
|
||||||
if ($tag_data != NULL){
|
if ($tag_data != NULL){
|
||||||
$page_tags = str_getcsv($tag_data);
|
$page_tags = str_getcsv($tag_data);
|
||||||
natcasesort($page_tags);
|
natcasesort($page_tags);
|
||||||
@ -43,5 +37,5 @@
|
|||||||
}
|
}
|
||||||
echo "</ul>\n</div>\n";
|
echo "</ul>\n</div>\n";
|
||||||
}
|
}
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/modal.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/modal.php');
|
||||||
?>
|
?>
|
@ -10,9 +10,9 @@ function format_page(){//Set the title of the page based on the main header, <h1
|
|||||||
var script = document.createElement('script');
|
var script = document.createElement('script');
|
||||||
var style_sheet = document.createElement('link');
|
var style_sheet = document.createElement('link');
|
||||||
script.type = 'text/javascript';
|
script.type = 'text/javascript';
|
||||||
script.src = '/common/prism/prism.js';
|
script.src = '/common/prisim/prism.js';
|
||||||
style_sheet.type = 'text/css';
|
style_sheet.type = 'text/css';
|
||||||
style_sheet.href = '/common/prism/prism.css';
|
style_sheet.href = '/common/prisim/prism.css';
|
||||||
style_sheet.rel = 'stylesheet';
|
style_sheet.rel = 'stylesheet';
|
||||||
document.head.appendChild(script);
|
document.head.appendChild(script);
|
||||||
document.head.appendChild(style_sheet);
|
document.head.appendChild(style_sheet);
|
@ -2,7 +2,7 @@
|
|||||||
<div class="pmenu">
|
<div class="pmenu">
|
||||||
<ul><li><a href=/>Home</a></li></ul>
|
<ul><li><a href=/>Home</a></li></ul>
|
||||||
<?php
|
<?php
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/get_month_name.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/get_month_name.php');
|
||||||
|
|
||||||
//Removes the number used to keep articles in post order from the displayed title.
|
//Removes the number used to keep articles in post order from the displayed title.
|
||||||
function remove_sorting_number($link_title){
|
function remove_sorting_number($link_title){
|
||||||
@ -23,7 +23,6 @@ if (file_exists($dir) && is_dir($dir) ) {
|
|||||||
$files_arr = array_diff($scan_arr, array('.','..','index.php','common','.htaccess') );
|
$files_arr = array_diff($scan_arr, array('.','..','index.php','common','.htaccess') );
|
||||||
// echo "<pre>"; print_r( $files_arr ); echo "</pre>";
|
// echo "<pre>"; print_r( $files_arr ); echo "</pre>";
|
||||||
// Get each files of our directory with line break
|
// Get each files of our directory with line break
|
||||||
if (sizeof($files_arr) != 0 ) {
|
|
||||||
foreach ($files_arr as $file) {
|
foreach ($files_arr as $file) {
|
||||||
//Get the file path
|
//Get the file path
|
||||||
$file_path = "./".$file;
|
$file_path = "./".$file;
|
||||||
@ -43,7 +42,6 @@ if (file_exists($dir) && is_dir($dir) ) {
|
|||||||
echo("<ul><li><a href='$file'> $link_title </a></li></ul>\n");//Output the result.
|
echo("<ul><li><a href='$file'> $link_title </a></li></ul>\n");//Output the result.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
echo "Directory does not exists";
|
echo "Directory does not exists";
|
||||||
}
|
}
|
36
common/page_menu_table.php
Normal file
36
common/page_menu_table.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<table border="1" class="pmenu">
|
||||||
|
<tr>
|
||||||
|
<td><a href=/>Home</a></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$dir = '.';
|
||||||
|
// Check if the directory exists
|
||||||
|
if (file_exists($dir) && is_dir($dir) ) {
|
||||||
|
// Get the files of the directory as an array
|
||||||
|
$scan_arr = scandir($dir);
|
||||||
|
$files_arr = array_diff($scan_arr, array('.','..','index.php','common','.htaccess') );
|
||||||
|
// echo "<pre>"; print_r( $files_arr ); echo "</pre>";
|
||||||
|
// Get each files of our directory with line break
|
||||||
|
foreach ($files_arr as $file) {
|
||||||
|
//Get the file path
|
||||||
|
$file_path = "./".$file;
|
||||||
|
// Get the file extension
|
||||||
|
$file_ext = pathinfo($file_path, PATHINFO_EXTENSION);
|
||||||
|
if ($file_ext=="php" || $file_ext=="html" || $file_ext=="htm" || $file_ext == "") {
|
||||||
|
$file_array[] = $file;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach($file_array as $file) {
|
||||||
|
$_replace = array('.php', '.html', '.htm');
|
||||||
|
$link_title = str_replace('_',' ',$file);
|
||||||
|
$link_title = str_replace($_replace,'',$link_title);
|
||||||
|
$link_title = ucwords($link_title);
|
||||||
|
echo("<tr><td><a href='$file'> $link_title </a></td></tr>\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "Directory does not exists";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
</table>
|
0
common/path_menu.php
Normal file
0
common/path_menu.php
Normal file
@ -1,14 +0,0 @@
|
|||||||
<?php
|
|
||||||
//The common file used to render pages on the blog.
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
|
||||||
//Looks for an article.md to see if the current directory is an article or not
|
|
||||||
//If it is not then it is a menu page.
|
|
||||||
if (file_exists('article.md')){
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/article.php');
|
|
||||||
} else {
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/h1_month.php');
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/page_menu.php');
|
|
||||||
}
|
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
|
|
||||||
?>
|
|
@ -1,12 +0,0 @@
|
|||||||
<?php
|
|
||||||
#Markdown parser dependancy
|
|
||||||
require ($_SERVER['DOCUMENT_ROOT'].'/common/vendor/autoload.php');
|
|
||||||
function read_md($MD_Path){
|
|
||||||
#Markdown parseing code.
|
|
||||||
$MD_Parser = new ParsedownExtra();
|
|
||||||
$MD_File = fopen($MD_Path, "r") or die("File not found.");
|
|
||||||
$MD_Text = fread($MD_File, filesize($MD_Path));
|
|
||||||
return $MD_Parser->text($MD_Text);
|
|
||||||
fclose($MD_File);
|
|
||||||
}
|
|
||||||
?>
|
|
1
common/print.css
Normal file
1
common/print.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
@ -125,27 +125,6 @@ img{
|
|||||||
img.center_align{
|
img.center_align{
|
||||||
vertical-align:middle;
|
vertical-align:middle;
|
||||||
}
|
}
|
||||||
img.pfp {
|
|
||||||
vertical-align: middle;
|
|
||||||
width: 50px;
|
|
||||||
height: 50px;
|
|
||||||
border-radius: 25px;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 1px;
|
|
||||||
}
|
|
||||||
img.pfp-small {
|
|
||||||
vertical-align: middle;
|
|
||||||
width: 25px;
|
|
||||||
height: 25px;
|
|
||||||
border-radius: 25px;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 1px;
|
|
||||||
}
|
|
||||||
div.byline {
|
|
||||||
border-top: solid;
|
|
||||||
margin-left: 25%;
|
|
||||||
margin-right: 25%;
|
|
||||||
}
|
|
||||||
.top{
|
.top{
|
||||||
max-width: 100vw;
|
max-width: 100vw;
|
||||||
float: left;
|
float: left;
|
||||||
@ -343,12 +322,6 @@ img:hover {opacity: 0.7;}
|
|||||||
margin-left: 5%;
|
margin-left: 5%;
|
||||||
margin-right: 5%;
|
margin-right: 5%;
|
||||||
}
|
}
|
||||||
div.byline {
|
|
||||||
border-top: solid;
|
|
||||||
margin-left: 5%;
|
|
||||||
margin-right: 5%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1{
|
h1{
|
||||||
padding-left: 5%;
|
padding-left: 5%;
|
||||||
}
|
}
|
86
common/vendor/composer/ClassLoader.php
vendored
86
common/vendor/composer/ClassLoader.php
vendored
@ -37,13 +37,11 @@ namespace Composer\Autoload;
|
|||||||
*
|
*
|
||||||
* @author Fabien Potencier <fabien@symfony.com>
|
* @author Fabien Potencier <fabien@symfony.com>
|
||||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||||
* @see https://www.php-fig.org/psr/psr-0/
|
* @see http://www.php-fig.org/psr/psr-0/
|
||||||
* @see https://www.php-fig.org/psr/psr-4/
|
* @see http://www.php-fig.org/psr/psr-4/
|
||||||
*/
|
*/
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
private $vendorDir;
|
|
||||||
|
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $prefixLengthsPsr4 = array();
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
@ -57,19 +55,11 @@ class ClassLoader
|
|||||||
private $classMap = array();
|
private $classMap = array();
|
||||||
private $classMapAuthoritative = false;
|
private $classMapAuthoritative = false;
|
||||||
private $missingClasses = array();
|
private $missingClasses = array();
|
||||||
private $apcuPrefix;
|
|
||||||
|
|
||||||
private static $registeredLoaders = array();
|
|
||||||
|
|
||||||
public function __construct($vendorDir = null)
|
|
||||||
{
|
|
||||||
$this->vendorDir = $vendorDir;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getPrefixes()
|
public function getPrefixes()
|
||||||
{
|
{
|
||||||
if (!empty($this->prefixesPsr0)) {
|
if (!empty($this->prefixesPsr0)) {
|
||||||
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
|
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array();
|
return array();
|
||||||
@ -281,26 +271,6 @@ class ClassLoader
|
|||||||
return $this->classMapAuthoritative;
|
return $this->classMapAuthoritative;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
|
||||||
*
|
|
||||||
* @param string|null $apcuPrefix
|
|
||||||
*/
|
|
||||||
public function setApcuPrefix($apcuPrefix)
|
|
||||||
{
|
|
||||||
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The APCu prefix in use, or null if APCu caching is not enabled.
|
|
||||||
*
|
|
||||||
* @return string|null
|
|
||||||
*/
|
|
||||||
public function getApcuPrefix()
|
|
||||||
{
|
|
||||||
return $this->apcuPrefix;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers this instance as an autoloader.
|
* Registers this instance as an autoloader.
|
||||||
*
|
*
|
||||||
@ -309,15 +279,6 @@ class ClassLoader
|
|||||||
public function register($prepend = false)
|
public function register($prepend = false)
|
||||||
{
|
{
|
||||||
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
||||||
|
|
||||||
if (null === $this->vendorDir) {
|
|
||||||
//no-op
|
|
||||||
} elseif ($prepend) {
|
|
||||||
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
|
|
||||||
} else {
|
|
||||||
unset(self::$registeredLoaders[$this->vendorDir]);
|
|
||||||
self::$registeredLoaders[$this->vendorDir] = $this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -326,10 +287,6 @@ class ClassLoader
|
|||||||
public function unregister()
|
public function unregister()
|
||||||
{
|
{
|
||||||
spl_autoload_unregister(array($this, 'loadClass'));
|
spl_autoload_unregister(array($this, 'loadClass'));
|
||||||
|
|
||||||
if (null !== $this->vendorDir) {
|
|
||||||
unset(self::$registeredLoaders[$this->vendorDir]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -356,6 +313,11 @@ class ClassLoader
|
|||||||
*/
|
*/
|
||||||
public function findFile($class)
|
public function findFile($class)
|
||||||
{
|
{
|
||||||
|
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
|
||||||
|
if ('\\' == $class[0]) {
|
||||||
|
$class = substr($class, 1);
|
||||||
|
}
|
||||||
|
|
||||||
// class map lookup
|
// class map lookup
|
||||||
if (isset($this->classMap[$class])) {
|
if (isset($this->classMap[$class])) {
|
||||||
return $this->classMap[$class];
|
return $this->classMap[$class];
|
||||||
@ -363,12 +325,6 @@ class ClassLoader
|
|||||||
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (null !== $this->apcuPrefix) {
|
|
||||||
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
|
|
||||||
if ($hit) {
|
|
||||||
return $file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$file = $this->findFileWithExtension($class, '.php');
|
$file = $this->findFileWithExtension($class, '.php');
|
||||||
|
|
||||||
@ -377,10 +333,6 @@ class ClassLoader
|
|||||||
$file = $this->findFileWithExtension($class, '.hh');
|
$file = $this->findFileWithExtension($class, '.hh');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null !== $this->apcuPrefix) {
|
|
||||||
apcu_add($this->apcuPrefix.$class, $file);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (false === $file) {
|
if (false === $file) {
|
||||||
// Remember that this class does not exist.
|
// Remember that this class does not exist.
|
||||||
$this->missingClasses[$class] = true;
|
$this->missingClasses[$class] = true;
|
||||||
@ -389,16 +341,6 @@ class ClassLoader
|
|||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the currently registered loaders indexed by their corresponding vendor directories.
|
|
||||||
*
|
|
||||||
* @return self[]
|
|
||||||
*/
|
|
||||||
public static function getRegisteredLoaders()
|
|
||||||
{
|
|
||||||
return self::$registeredLoaders;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function findFileWithExtension($class, $ext)
|
private function findFileWithExtension($class, $ext)
|
||||||
{
|
{
|
||||||
// PSR-4 lookup
|
// PSR-4 lookup
|
||||||
@ -406,14 +348,10 @@ class ClassLoader
|
|||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
if (0 === strpos($class, $prefix)) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
|
||||||
$search = $subPath . '\\';
|
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
|
||||||
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
|
||||||
if (file_exists($file = $dir . $pathEnd)) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
302
common/vendor/composer/InstalledVersions.php
vendored
302
common/vendor/composer/InstalledVersions.php
vendored
@ -1,302 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file is part of Composer.
|
|
||||||
*
|
|
||||||
* (c) Nils Adermann <naderman@naderman.de>
|
|
||||||
* Jordi Boggiano <j.boggiano@seld.be>
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Composer;
|
|
||||||
|
|
||||||
use Composer\Autoload\ClassLoader;
|
|
||||||
use Composer\Semver\VersionParser;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This class is copied in every Composer installed project and available to all
|
|
||||||
*
|
|
||||||
* To require it's presence, you can require `composer-runtime-api ^2.0`
|
|
||||||
*/
|
|
||||||
class InstalledVersions
|
|
||||||
{
|
|
||||||
private static $installed = array (
|
|
||||||
'root' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => 'dev-master',
|
|
||||||
'version' => 'dev-master',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => 'ad07963e4bb0fe72f9d8399448ed3c30d31e62ed',
|
|
||||||
'name' => '__root__',
|
|
||||||
),
|
|
||||||
'versions' =>
|
|
||||||
array (
|
|
||||||
'__root__' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => 'dev-master',
|
|
||||||
'version' => 'dev-master',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => 'ad07963e4bb0fe72f9d8399448ed3c30d31e62ed',
|
|
||||||
),
|
|
||||||
'erusev/parsedown' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => '1.7.4',
|
|
||||||
'version' => '1.7.4.0',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => 'cb17b6477dfff935958ba01325f2e8a2bfa6dab3',
|
|
||||||
),
|
|
||||||
'erusev/parsedown-extra' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => '0.8.1',
|
|
||||||
'version' => '0.8.1.0',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => '91ac3ff98f0cea243bdccc688df43810f044dcef',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
private static $canGetVendors;
|
|
||||||
private static $installedByVendor = array();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a list of all package names which are present, either by being installed, replaced or provided
|
|
||||||
*
|
|
||||||
* @return string[]
|
|
||||||
* @psalm-return list<string>
|
|
||||||
*/
|
|
||||||
public static function getInstalledPackages()
|
|
||||||
{
|
|
||||||
$packages = array();
|
|
||||||
foreach (self::getInstalled() as $installed) {
|
|
||||||
$packages[] = array_keys($installed['versions']);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (1 === \count($packages)) {
|
|
||||||
return $packages[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks whether the given package is installed
|
|
||||||
*
|
|
||||||
* This also returns true if the package name is provided or replaced by another package
|
|
||||||
*
|
|
||||||
* @param string $packageName
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public static function isInstalled($packageName)
|
|
||||||
{
|
|
||||||
foreach (self::getInstalled() as $installed) {
|
|
||||||
if (isset($installed['versions'][$packageName])) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks whether the given package satisfies a version constraint
|
|
||||||
*
|
|
||||||
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
|
|
||||||
*
|
|
||||||
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
|
|
||||||
*
|
|
||||||
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
|
|
||||||
* @param string $packageName
|
|
||||||
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
|
||||||
{
|
|
||||||
$constraint = $parser->parseConstraints($constraint);
|
|
||||||
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
|
||||||
|
|
||||||
return $provided->matches($constraint);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a version constraint representing all the range(s) which are installed for a given package
|
|
||||||
*
|
|
||||||
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
|
|
||||||
* whether a given version of a package is installed, and not just whether it exists
|
|
||||||
*
|
|
||||||
* @param string $packageName
|
|
||||||
* @return string Version constraint usable with composer/semver
|
|
||||||
*/
|
|
||||||
public static function getVersionRanges($packageName)
|
|
||||||
{
|
|
||||||
foreach (self::getInstalled() as $installed) {
|
|
||||||
if (!isset($installed['versions'][$packageName])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$ranges = array();
|
|
||||||
if (isset($installed['versions'][$packageName]['pretty_version'])) {
|
|
||||||
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
|
|
||||||
}
|
|
||||||
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
|
|
||||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
|
|
||||||
}
|
|
||||||
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
|
|
||||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
|
|
||||||
}
|
|
||||||
if (array_key_exists('provided', $installed['versions'][$packageName])) {
|
|
||||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
|
|
||||||
}
|
|
||||||
|
|
||||||
return implode(' || ', $ranges);
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $packageName
|
|
||||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
|
||||||
*/
|
|
||||||
public static function getVersion($packageName)
|
|
||||||
{
|
|
||||||
foreach (self::getInstalled() as $installed) {
|
|
||||||
if (!isset($installed['versions'][$packageName])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($installed['versions'][$packageName]['version'])) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $installed['versions'][$packageName]['version'];
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $packageName
|
|
||||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
|
||||||
*/
|
|
||||||
public static function getPrettyVersion($packageName)
|
|
||||||
{
|
|
||||||
foreach (self::getInstalled() as $installed) {
|
|
||||||
if (!isset($installed['versions'][$packageName])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $installed['versions'][$packageName]['pretty_version'];
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $packageName
|
|
||||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
|
|
||||||
*/
|
|
||||||
public static function getReference($packageName)
|
|
||||||
{
|
|
||||||
foreach (self::getInstalled() as $installed) {
|
|
||||||
if (!isset($installed['versions'][$packageName])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($installed['versions'][$packageName]['reference'])) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $installed['versions'][$packageName]['reference'];
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}
|
|
||||||
*/
|
|
||||||
public static function getRootPackage()
|
|
||||||
{
|
|
||||||
$installed = self::getInstalled();
|
|
||||||
|
|
||||||
return $installed[0]['root'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the raw installed.php data for custom implementations
|
|
||||||
*
|
|
||||||
* @return array[]
|
|
||||||
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}, versions: list<string, array{pretty_version: ?string, version: ?string, aliases: ?string[], reference: ?string, replaced: ?string[], provided: ?string[]}>}
|
|
||||||
*/
|
|
||||||
public static function getRawData()
|
|
||||||
{
|
|
||||||
return self::$installed;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Lets you reload the static array from another file
|
|
||||||
*
|
|
||||||
* This is only useful for complex integrations in which a project needs to use
|
|
||||||
* this class but then also needs to execute another project's autoloader in process,
|
|
||||||
* and wants to ensure both projects have access to their version of installed.php.
|
|
||||||
*
|
|
||||||
* A typical case would be PHPUnit, where it would need to make sure it reads all
|
|
||||||
* the data it needs from this class, then call reload() with
|
|
||||||
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
|
|
||||||
* the project in which it runs can then also use this class safely, without
|
|
||||||
* interference between PHPUnit's dependencies and the project's dependencies.
|
|
||||||
*
|
|
||||||
* @param array[] $data A vendor/composer/installed.php data set
|
|
||||||
* @return void
|
|
||||||
*
|
|
||||||
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}, versions: list<string, array{pretty_version: ?string, version: ?string, aliases: ?string[], reference: ?string, replaced: ?string[], provided: ?string[]}>} $data
|
|
||||||
*/
|
|
||||||
public static function reload($data)
|
|
||||||
{
|
|
||||||
self::$installed = $data;
|
|
||||||
self::$installedByVendor = array();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array[]
|
|
||||||
*/
|
|
||||||
private static function getInstalled()
|
|
||||||
{
|
|
||||||
if (null === self::$canGetVendors) {
|
|
||||||
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
|
|
||||||
}
|
|
||||||
|
|
||||||
$installed = array();
|
|
||||||
|
|
||||||
if (self::$canGetVendors) {
|
|
||||||
// @phpstan-ignore-next-line
|
|
||||||
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
|
||||||
if (isset(self::$installedByVendor[$vendorDir])) {
|
|
||||||
$installed[] = self::$installedByVendor[$vendorDir];
|
|
||||||
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
|
||||||
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$installed[] = self::$installed;
|
|
||||||
|
|
||||||
return $installed;
|
|
||||||
}
|
|
||||||
}
|
|
43
common/vendor/composer/LICENSE
vendored
43
common/vendor/composer/LICENSE
vendored
@ -1,15 +1,52 @@
|
|||||||
Copyright (c) Nils Adermann, Jordi Boggiano
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: Composer
|
||||||
|
Upstream-Contact: Jordi Boggiano <j.boggiano@seld.be>
|
||||||
|
Source: https://github.com/composer/composer
|
||||||
|
|
||||||
|
Files: *
|
||||||
|
Copyright: 2016, Nils Adermann <naderman@naderman.de>
|
||||||
|
2016, Jordi Boggiano <j.boggiano@seld.be>
|
||||||
|
License: Expat
|
||||||
|
|
||||||
|
Files: src/Composer/Util/TlsHelper.php
|
||||||
|
Copyright: 2016, Nils Adermann <naderman@naderman.de>
|
||||||
|
2016, Jordi Boggiano <j.boggiano@seld.be>
|
||||||
|
2013, Evan Coury <me@evancoury.com>
|
||||||
|
License: Expat and BSD-2-Clause
|
||||||
|
|
||||||
|
License: BSD-2-Clause
|
||||||
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
are permitted provided that the following conditions are met:
|
||||||
|
.
|
||||||
|
* Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
.
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
License: Expat
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is furnished
|
copies of the Software, and to permit persons to whom the Software is furnished
|
||||||
to do so, subject to the following conditions:
|
to do so, subject to the following conditions:
|
||||||
|
.
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The above copyright notice and this permission notice shall be included in all
|
||||||
copies or substantial portions of the Software.
|
copies or substantial portions of the Software.
|
||||||
|
.
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
1
common/vendor/composer/autoload_classmap.php
vendored
1
common/vendor/composer/autoload_classmap.php
vendored
@ -6,5 +6,4 @@ $vendorDir = dirname(dirname(__FILE__));
|
|||||||
$baseDir = dirname($vendorDir);
|
$baseDir = dirname($vendorDir);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
|
||||||
);
|
);
|
||||||
|
11
common/vendor/composer/autoload_real.php
vendored
11
common/vendor/composer/autoload_real.php
vendored
@ -13,24 +13,19 @@ class ComposerAutoloaderInitae431d6e5e864517dac9bce927d03088
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Composer\Autoload\ClassLoader
|
|
||||||
*/
|
|
||||||
public static function getLoader()
|
public static function getLoader()
|
||||||
{
|
{
|
||||||
if (null !== self::$loader) {
|
if (null !== self::$loader) {
|
||||||
return self::$loader;
|
return self::$loader;
|
||||||
}
|
}
|
||||||
|
|
||||||
require __DIR__ . '/platform_check.php';
|
|
||||||
|
|
||||||
spl_autoload_register(array('ComposerAutoloaderInitae431d6e5e864517dac9bce927d03088', 'loadClassLoader'), true, true);
|
spl_autoload_register(array('ComposerAutoloaderInitae431d6e5e864517dac9bce927d03088', 'loadClassLoader'), true, true);
|
||||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||||
spl_autoload_unregister(array('ComposerAutoloaderInitae431d6e5e864517dac9bce927d03088', 'loadClassLoader'));
|
spl_autoload_unregister(array('ComposerAutoloaderInitae431d6e5e864517dac9bce927d03088', 'loadClassLoader'));
|
||||||
|
|
||||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
|
||||||
if ($useStaticLoader) {
|
if ($useStaticLoader) {
|
||||||
require __DIR__ . '/autoload_static.php';
|
require_once __DIR__ . '/autoload_static.php';
|
||||||
|
|
||||||
call_user_func(\Composer\Autoload\ComposerStaticInitae431d6e5e864517dac9bce927d03088::getInitializer($loader));
|
call_user_func(\Composer\Autoload\ComposerStaticInitae431d6e5e864517dac9bce927d03088::getInitializer($loader));
|
||||||
} else {
|
} else {
|
||||||
|
5
common/vendor/composer/autoload_static.php
vendored
5
common/vendor/composer/autoload_static.php
vendored
@ -20,15 +20,10 @@ class ComposerStaticInitae431d6e5e864517dac9bce927d03088
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $classMap = array (
|
|
||||||
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
|
||||||
);
|
|
||||||
|
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixesPsr0 = ComposerStaticInitae431d6e5e864517dac9bce927d03088::$prefixesPsr0;
|
$loader->prefixesPsr0 = ComposerStaticInitae431d6e5e864517dac9bce927d03088::$prefixesPsr0;
|
||||||
$loader->classMap = ComposerStaticInitae431d6e5e864517dac9bce927d03088::$classMap;
|
|
||||||
|
|
||||||
}, null, ClassLoader::class);
|
}, null, ClassLoader::class);
|
||||||
}
|
}
|
||||||
|
26
common/vendor/composer/installed.json
vendored
26
common/vendor/composer/installed.json
vendored
@ -1,5 +1,4 @@
|
|||||||
{
|
[
|
||||||
"packages": [
|
|
||||||
{
|
{
|
||||||
"name": "erusev/parsedown",
|
"name": "erusev/parsedown",
|
||||||
"version": "1.7.4",
|
"version": "1.7.4",
|
||||||
@ -22,7 +21,7 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.8.35"
|
"phpunit/phpunit": "^4.8.35"
|
||||||
},
|
},
|
||||||
"time": "2019-12-30T22:54:17+00:00",
|
"time": "2019-12-30 22:54:17",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -46,12 +45,7 @@
|
|||||||
"keywords": [
|
"keywords": [
|
||||||
"markdown",
|
"markdown",
|
||||||
"parser"
|
"parser"
|
||||||
],
|
]
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/erusev/parsedown/issues",
|
|
||||||
"source": "https://github.com/erusev/parsedown/tree/1.7.x"
|
|
||||||
},
|
|
||||||
"install-path": "../erusev/parsedown"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "erusev/parsedown-extra",
|
"name": "erusev/parsedown-extra",
|
||||||
@ -74,7 +68,7 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.8.35"
|
"phpunit/phpunit": "^4.8.35"
|
||||||
},
|
},
|
||||||
"time": "2019-12-30T23:20:37+00:00",
|
"time": "2019-12-30 23:20:37",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -100,14 +94,6 @@
|
|||||||
"markdown extra",
|
"markdown extra",
|
||||||
"parsedown",
|
"parsedown",
|
||||||
"parser"
|
"parser"
|
||||||
],
|
]
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/erusev/parsedown-extra/issues",
|
|
||||||
"source": "https://github.com/erusev/parsedown-extra/tree/0.8.x"
|
|
||||||
},
|
|
||||||
"install-path": "../erusev/parsedown-extra"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"dev": true,
|
|
||||||
"dev-package-names": []
|
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
42
common/vendor/composer/installed.php
vendored
42
common/vendor/composer/installed.php
vendored
@ -1,42 +0,0 @@
|
|||||||
<?php return array (
|
|
||||||
'root' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => 'dev-master',
|
|
||||||
'version' => 'dev-master',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => 'ad07963e4bb0fe72f9d8399448ed3c30d31e62ed',
|
|
||||||
'name' => '__root__',
|
|
||||||
),
|
|
||||||
'versions' =>
|
|
||||||
array (
|
|
||||||
'__root__' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => 'dev-master',
|
|
||||||
'version' => 'dev-master',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => 'ad07963e4bb0fe72f9d8399448ed3c30d31e62ed',
|
|
||||||
),
|
|
||||||
'erusev/parsedown' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => '1.7.4',
|
|
||||||
'version' => '1.7.4.0',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => 'cb17b6477dfff935958ba01325f2e8a2bfa6dab3',
|
|
||||||
),
|
|
||||||
'erusev/parsedown-extra' =>
|
|
||||||
array (
|
|
||||||
'pretty_version' => '0.8.1',
|
|
||||||
'version' => '0.8.1.0',
|
|
||||||
'aliases' =>
|
|
||||||
array (
|
|
||||||
),
|
|
||||||
'reference' => '91ac3ff98f0cea243bdccc688df43810f044dcef',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
26
common/vendor/composer/platform_check.php
vendored
26
common/vendor/composer/platform_check.php
vendored
@ -1,26 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
// platform_check.php @generated by Composer
|
|
||||||
|
|
||||||
$issues = array();
|
|
||||||
|
|
||||||
if (!(PHP_VERSION_ID >= 50300)) {
|
|
||||||
$issues[] = 'Your Composer dependencies require a PHP version ">= 5.3.0". You are running ' . PHP_VERSION . '.';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($issues) {
|
|
||||||
if (!headers_sent()) {
|
|
||||||
header('HTTP/1.1 500 Internal Server Error');
|
|
||||||
}
|
|
||||||
if (!ini_get('display_errors')) {
|
|
||||||
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
|
||||||
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
|
|
||||||
} elseif (!headers_sent()) {
|
|
||||||
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
trigger_error(
|
|
||||||
'Composer detected issues in your platform: ' . implode(' ', $issues),
|
|
||||||
E_USER_ERROR
|
|
||||||
);
|
|
||||||
}
|
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
include ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||||
?>
|
?>
|
||||||
<article>
|
<article>
|
||||||
<h1 title="Homepage for <?php $site = $_SERVER['SERVER_NAME'];echo"$site";?>">Homepage</h1>
|
<h1 title="Homepage for <?php $site = $_SERVER['SERVER_NAME'];echo"$site";?>">Homepage</h1>
|
||||||
@ -11,5 +11,5 @@ include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
|||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
<?php
|
<?php
|
||||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
|
include ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');
|
||||||
?>
|
?>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
require ($_SERVER['DOCUMENT_ROOT'].'/common/vendor/autoload.php');
|
require ($_SERVER['DOCUMENT_ROOT'].'/common/vendor/autoload.php');
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||||
#Markdown parseing code.
|
#Markdown parseing code.
|
||||||
$MD_Parser = new Parsedown();
|
$MD_Parser = new Parsedown();
|
||||||
$MD_Path = "gplv2.md";
|
$MD_Path = "gplv2.md";
|
||||||
@ -10,5 +10,5 @@
|
|||||||
echo "<article>".$MD_Parser->text($MD_Text);
|
echo "<article>".$MD_Parser->text($MD_Text);
|
||||||
fclose($MD_File);
|
fclose($MD_File);
|
||||||
echo "<p>A text version of this document can be found <a href=\"/GPLv2.txt\">here</a>.</p>\n</article>";
|
echo "<p>A text version of this document can be found <a href=\"/GPLv2.txt\">here</a>.</p>\n</article>";
|
||||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
|
include ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');
|
||||||
?>
|
?>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
require ($_SERVER['DOCUMENT_ROOT'].'/common/vendor/autoload.php');
|
require ($_SERVER['DOCUMENT_ROOT'].'/common/vendor/autoload.php');
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||||
echo "<article>";
|
echo "<article>";
|
||||||
?>
|
?>
|
||||||
<p>The MIT License (MIT)</p>
|
<p>The MIT License (MIT)</p>
|
||||||
@ -15,5 +15,5 @@
|
|||||||
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
|
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
|
||||||
<?php
|
<?php
|
||||||
echo "<p>A text version of this document can be found <a href=\"/license/MIT.txt\">here</a>.</p>\n</article>";
|
echo "<p>A text version of this document can be found <a href=\"/license/MIT.txt\">here</a>.</p>\n</article>";
|
||||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
|
include ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');
|
||||||
?>
|
?>
|
||||||
|
@ -3,12 +3,12 @@ function display_file($license_file){
|
|||||||
$out = file_get_contents($license_file);
|
$out = file_get_contents($license_file);
|
||||||
echo "<pre><code>".$out."</code></pre>";
|
echo "<pre><code>".$out."</code></pre>";
|
||||||
}
|
}
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||||
?>
|
?>
|
||||||
<article>
|
<article>
|
||||||
<p>A summery of all licenses that apply to this website.</p>
|
<p>A summery of all licenses that apply to this website.</p>
|
||||||
<h2>simple_blog License</h2>
|
<h2>Code License</h2>
|
||||||
<font size="2">
|
<font size="2">
|
||||||
Copyright <?php echo(strftime("%Y")); ?> 20xd6<br>
|
Copyright <?php echo(strftime("%Y")); ?> 20xd6<br>
|
||||||
<br>
|
<br>
|
||||||
@ -46,15 +46,5 @@ JMenu is <a href="/license/MIT.php">MIT Licensed</a>.</p>
|
|||||||
<p>Parsedown is used for all of the Markdown processing for this site.<br/>
|
<p>Parsedown is used for all of the Markdown processing for this site.<br/>
|
||||||
Parsedown is <a href="/license/MIT.php">MIT Licensed</a>.</p>
|
Parsedown is <a href="/license/MIT.php">MIT Licensed</a>.</p>
|
||||||
<?php display_file($_SERVER['DOCUMENT_ROOT'].'/common/vendor/erusev/parsedown/LICENSE.txt');?>
|
<?php display_file($_SERVER['DOCUMENT_ROOT'].'/common/vendor/erusev/parsedown/LICENSE.txt');?>
|
||||||
<h3><a href="https://github.com/erusev/parsedown-extra">Parsedown Extra</a></h3>
|
|
||||||
<blockquote><p>An extension of <a href="https://github.com/erusev/parsedown">Parsedown</a> that adds support for <a href="https://michelf.ca/projects/php-markdown/extra/">Markdown Extra.</a></p></blockquote>
|
|
||||||
<p>Pasrsedown-extra is used primarily to add support for footnotes in articles. <br/>Parsedown-extra is <a href="/license/MIT.php">MIT Licensed</a>.</p>
|
|
||||||
<?php display_file($_SERVER['DOCUMENT_ROOT'].'/common/vendor/erusev/parsedown-extra/LICENSE.txt');?>
|
|
||||||
<h3>Prism</h3>
|
|
||||||
<blockquote><p>Prism is a lightweight, robust, and elegant syntax highlighting library. It's a spin-off project from <a href="https://dabblet.com/">Dabblet</a>.<br/>
|
|
||||||
You can learn more on <a href="https://prismjs.com/">prismjs.com</a>.</p></blockquote>
|
|
||||||
<p>Prism is used for syntax highlighting is simple_blog.<br/>
|
|
||||||
Prism is <a href="/license/MIT.php">MIT Licensed</a>.</p>
|
|
||||||
<?php display_file("MIT_License.txt"); ?>
|
|
||||||
</article>
|
</article>
|
||||||
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');?>
|
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user