mirror of https://github.com/ThunixdotNet/www.git
Avoid undefined variable warnings in wiki, users and server pages
This commit is contained in:
parent
107ea4f396
commit
48922db7c4
|
@ -8,24 +8,20 @@ include('../config.php');
|
||||||
include('../parsedown-1.7.3/Parsedown.php');
|
include('../parsedown-1.7.3/Parsedown.php');
|
||||||
include('../parsedown-extra-0.7.1/ParsedownExtra.php');
|
include('../parsedown-extra-0.7.1/ParsedownExtra.php');
|
||||||
|
|
||||||
|
if(isset($_GET['page']))
|
||||||
$page = $_GET['page'];
|
$page = $_GET['page'];
|
||||||
$style = $_GET['style'];
|
else
|
||||||
|
$page = "server";
|
||||||
|
|
||||||
|
if(isset($_GET['style']))
|
||||||
|
$site_style = $_GET['style'];
|
||||||
|
|
||||||
$Parsedown = new Parsedown();
|
$Parsedown = new Parsedown();
|
||||||
$Parsedown->setMarkupEscaped(true);
|
$Parsedown->setMarkupEscaped(true);
|
||||||
$ParsedownExtra = new ParsedownExtra();
|
$ParsedownExtra = new ParsedownExtra();
|
||||||
|
|
||||||
if ( $page == "") {
|
if (empty($site_style))
|
||||||
$page = "main";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $style == "") {
|
|
||||||
if ( $site_style == "") {
|
|
||||||
$site_style="site";
|
$site_style="site";
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$site_style=$style;
|
|
||||||
}
|
|
||||||
|
|
||||||
$header = file_get_contents("$doc_root/includes/header.md");
|
$header = file_get_contents("$doc_root/includes/header.md");
|
||||||
$sidebar = file_get_contents("$doc_root/includes/sidebar.md");
|
$sidebar = file_get_contents("$doc_root/includes/sidebar.md");
|
||||||
|
|
|
@ -8,24 +8,20 @@ include('../config.php');
|
||||||
include('../parsedown-1.7.3/Parsedown.php');
|
include('../parsedown-1.7.3/Parsedown.php');
|
||||||
include('../parsedown-extra-0.7.1/ParsedownExtra.php');
|
include('../parsedown-extra-0.7.1/ParsedownExtra.php');
|
||||||
|
|
||||||
|
if(isset($_GET['page']))
|
||||||
$page = $_GET['page'];
|
$page = $_GET['page'];
|
||||||
$style = $_GET['style'];
|
else
|
||||||
|
$page = "users";
|
||||||
|
|
||||||
|
if(isset($_GET['style']))
|
||||||
|
$site_style = $_GET['style'];
|
||||||
|
|
||||||
$Parsedown = new Parsedown();
|
$Parsedown = new Parsedown();
|
||||||
$Parsedown->setMarkupEscaped(true);
|
$Parsedown->setMarkupEscaped(true);
|
||||||
$ParsedownExtra = new ParsedownExtra();
|
$ParsedownExtra = new ParsedownExtra();
|
||||||
|
|
||||||
if ( $page == "") {
|
if (empty($site_style))
|
||||||
$page = "main";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $style == "") {
|
|
||||||
if ( $site_style == "") {
|
|
||||||
$site_style="site";
|
$site_style="site";
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$site_style=$style;
|
|
||||||
}
|
|
||||||
|
|
||||||
$header = file_get_contents("$doc_root/includes/header.md");
|
$header = file_get_contents("$doc_root/includes/header.md");
|
||||||
$sidebar = file_get_contents("$doc_root/includes/sidebar.md");
|
$sidebar = file_get_contents("$doc_root/includes/sidebar.md");
|
||||||
|
|
21
wiki.php
21
wiki.php
|
@ -8,27 +8,20 @@ include('config.php');
|
||||||
include('parsedown-1.7.3/Parsedown.php');
|
include('parsedown-1.7.3/Parsedown.php');
|
||||||
include('parsedown-extra-0.7.1/ParsedownExtra.php');
|
include('parsedown-extra-0.7.1/ParsedownExtra.php');
|
||||||
|
|
||||||
|
if(isset($_GET['page']))
|
||||||
$page = $_GET['page'];
|
$page = $_GET['page'];
|
||||||
|
else
|
||||||
|
$page = "main";
|
||||||
|
|
||||||
if(isset($_GET['style']))
|
if(isset($_GET['style']))
|
||||||
{
|
$site_style = $_GET['style'];
|
||||||
$style = $_GET['style'];
|
|
||||||
}
|
|
||||||
$Parsedown = new Parsedown();
|
$Parsedown = new Parsedown();
|
||||||
$Parsedown->setMarkupEscaped(true);
|
$Parsedown->setMarkupEscaped(true);
|
||||||
$ParsedownExtra = new ParsedownExtra();
|
$ParsedownExtra = new ParsedownExtra();
|
||||||
|
|
||||||
if ( $page == "") {
|
if (empty($site_style))
|
||||||
$page = "main";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( empty($style)) {
|
|
||||||
if ( $site_style == "") {
|
|
||||||
$site_style="site";
|
$site_style="site";
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$site_style=$style;
|
|
||||||
}
|
|
||||||
|
|
||||||
$header = file_get_contents("$doc_root/includes/header.md");
|
$header = file_get_contents("$doc_root/includes/header.md");
|
||||||
$sidebar = file_get_contents("$doc_root/includes/sidebar.md");
|
$sidebar = file_get_contents("$doc_root/includes/sidebar.md");
|
||||||
|
|
Loading…
Reference in New Issue