|
@@ -2,33 +2,40 @@
|
|
|
<html dir="ltr" lang="en-US">
|
|
<html dir="ltr" lang="en-US">
|
|
|
<head>
|
|
<head>
|
|
|
<?php
|
|
<?php
|
|
|
- //SRSBIZNUSS below - you probably shouldn't edit this unless you know what you are doing
|
|
|
|
|
- //GET validation/sanitation and parameter variable definitions below
|
|
|
|
|
- if (!empty($_SERVER["HTTPS"])) {
|
|
|
|
|
- $protocol = "http";
|
|
|
|
|
- } else {
|
|
|
|
|
- $protocol = "https";
|
|
|
|
|
- }
|
|
|
|
|
- if (empty($_GET['nav'])) {
|
|
|
|
|
- $nav = '';
|
|
|
|
|
- }
|
|
|
|
|
- else {
|
|
|
|
|
- $nav = $_GET['nav'];
|
|
|
|
|
- }
|
|
|
|
|
- if (empty($_GET['post'])) {
|
|
|
|
|
- $post = '';
|
|
|
|
|
- }
|
|
|
|
|
- else {
|
|
|
|
|
- $post = $_GET['post'];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //SRSBIZNUSS below - you probably shouldn't edit this unless you know what you are doing
|
|
|
|
|
+ //GET validation/sanitation and parameter variable definitions below
|
|
|
|
|
+ if (!empty($_SERVER["HTTPS"])) {
|
|
|
|
|
+ $protocol = "http";
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $protocol = "https";
|
|
|
|
|
+ }
|
|
|
|
|
+ if (empty($_GET['nav'])) {
|
|
|
|
|
+ $nav = '';
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ $nav = $_GET['nav'];
|
|
|
|
|
+ }
|
|
|
|
|
+ if (empty($_GET['post'])) {
|
|
|
|
|
+ $post = '';
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ $post = $_GET['post'];
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- //input sanitization
|
|
|
|
|
- $pwd=$post;
|
|
|
|
|
- include 'sys/fileshare/sanitize.inc';
|
|
|
|
|
- if ($san == 1) {
|
|
|
|
|
- return(0);
|
|
|
|
|
- };
|
|
|
|
|
- extract(json_decode(file_get_contents('sys/admin/config/main.json'),true));
|
|
|
|
|
|
|
+ //input sanitization - XXX Why is this in the index? Should only be include in stuff that needs it
|
|
|
|
|
+ $pwd=$post;
|
|
|
|
|
+ include 'sys/fileshare/sanitize.inc';
|
|
|
|
|
+ if ($san == 1) {
|
|
|
|
|
+ return(0);
|
|
|
|
|
+ };
|
|
|
|
|
+ if(file_exists('sys/admin/config/main.json')) {
|
|
|
|
|
+ $config = json_decode(file_get_contents('sys/admin/config/main.json'),true);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ # XXX Need to have manual be hosted in repo under sys/admin/manual
|
|
|
|
|
+ echo "</head><body>tCMS has not gone through initial configuration.<br />";
|
|
|
|
|
+ echo 'Please see the <a href="https://tcms.troglodyne.net/index.php?nav=5&post=fileshare/manual/Chapter%2000-Introduction.post">tCMS Manual</a> for how to accomplish this.';
|
|
|
|
|
+ die("</body></html>");
|
|
|
|
|
+ }
|
|
|
?>
|
|
?>
|
|
|
<meta charset="utf-8" />
|
|
<meta charset="utf-8" />
|
|
|
<meta name="description" content="A Simple CMS by teodesian.net"/>
|
|
<meta name="description" content="A Simple CMS by teodesian.net"/>
|
|
@@ -48,17 +55,17 @@
|
|
|
<link rel="stylesheet" type="text/css" href="css/compat/ie6.css">
|
|
<link rel="stylesheet" type="text/css" href="css/compat/ie6.css">
|
|
|
<![endif]-->
|
|
<![endif]-->
|
|
|
<?php
|
|
<?php
|
|
|
- if(file_exists($_SERVER['DOCUMENT_ROOT'].'/'.$basedir.'/css/custom/screen.css')) {
|
|
|
|
|
|
|
+ if(file_exists('/css/custom/screen.css')) {
|
|
|
echo '<link rel="stylesheet" type="text/css" href="css/custom/screen.css" />';
|
|
echo '<link rel="stylesheet" type="text/css" href="css/custom/screen.css" />';
|
|
|
}
|
|
}
|
|
|
- if(file_exists($_SERVER['DOCUMENT_ROOT'].'/'.$basedir.'/css/custom/print.css')) {
|
|
|
|
|
|
|
+ if(file_exists('css/custom/print.css')) {
|
|
|
echo '<link rel="stylesheet" type="text/css" href="css/custom/print.css" />';
|
|
echo '<link rel="stylesheet" type="text/css" href="css/custom/print.css" />';
|
|
|
}
|
|
}
|
|
|
?>
|
|
?>
|
|
|
<link rel="icon" type="image/vnd.microsoft.icon" href="img/icon/favicon.ico" />
|
|
<link rel="icon" type="image/vnd.microsoft.icon" href="img/icon/favicon.ico" />
|
|
|
<title>
|
|
<title>
|
|
|
<?php
|
|
<?php
|
|
|
- echo $htmltitle;
|
|
|
|
|
|
|
+ echo $config['htmltitle'];
|
|
|
?>
|
|
?>
|
|
|
</title>
|
|
</title>
|
|
|
</head>
|
|
</head>
|
|
@@ -66,7 +73,7 @@
|
|
|
<div id="topkek">
|
|
<div id="topkek">
|
|
|
<?php
|
|
<?php
|
|
|
//Site's Titlebar comes in here
|
|
//Site's Titlebar comes in here
|
|
|
- include $toptitle;
|
|
|
|
|
|
|
+ include $config['toptitle'];
|
|
|
?>
|
|
?>
|
|
|
</div>
|
|
</div>
|
|
|
<div id="littlemenu">
|
|
<div id="littlemenu">
|
|
@@ -74,7 +81,7 @@
|
|
|
<div id="kontainer">
|
|
<div id="kontainer">
|
|
|
<div id="leftbar" class="kontained">
|
|
<div id="leftbar" class="kontained">
|
|
|
<?php
|
|
<?php
|
|
|
- include $leftbar;
|
|
|
|
|
|
|
+ include $config['leftbar'];
|
|
|
?>
|
|
?>
|
|
|
</div>
|
|
</div>
|
|
|
<div id="kontent" class="kontained">
|
|
<div id="kontent" class="kontained">
|
|
@@ -84,38 +91,38 @@
|
|
|
elseif case then specify the next number in the nav index along with the
|
|
elseif case then specify the next number in the nav index along with the
|
|
|
corresponding file to include above.*/
|
|
corresponding file to include above.*/
|
|
|
if (empty($nav)) {
|
|
if (empty($nav)) {
|
|
|
- $kontent = $home;
|
|
|
|
|
|
|
+ $kontent = $config['home'];
|
|
|
}
|
|
}
|
|
|
elseif ($nav == 1) {
|
|
elseif ($nav == 1) {
|
|
|
- $kontent = $fileshare;
|
|
|
|
|
|
|
+ $kontent = $config['fileshare'];
|
|
|
}
|
|
}
|
|
|
elseif ($nav == 2) {
|
|
elseif ($nav == 2) {
|
|
|
- $kontent = $microblog;
|
|
|
|
|
|
|
+ $kontent = $config['microblog'];
|
|
|
$editable = 0;
|
|
$editable = 0;
|
|
|
}
|
|
}
|
|
|
elseif ($nav == 3) {
|
|
elseif ($nav == 3) {
|
|
|
- $kontent = $blog;
|
|
|
|
|
|
|
+ $kontent = $config['blog'];
|
|
|
}
|
|
}
|
|
|
elseif ($nav == 4) {
|
|
elseif ($nav == 4) {
|
|
|
- $kontent = $about;
|
|
|
|
|
|
|
+ $kontent = $config['about'];
|
|
|
}
|
|
}
|
|
|
elseif ($nav == 5) {
|
|
elseif ($nav == 5) {
|
|
|
- $kontent = $postloader;
|
|
|
|
|
|
|
+ $kontent = $config['postloader'];
|
|
|
}
|
|
}
|
|
|
elseif ($nav == 6) {
|
|
elseif ($nav == 6) {
|
|
|
- $kontent = $codeloader;
|
|
|
|
|
|
|
+ $kontent = $config['codeloader'];
|
|
|
}
|
|
}
|
|
|
elseif ($nav == 7) {
|
|
elseif ($nav == 7) {
|
|
|
- $kontent = $audioloader;
|
|
|
|
|
|
|
+ $kontent = $config['audioloader'];
|
|
|
}
|
|
}
|
|
|
elseif ($nav == 8) {
|
|
elseif ($nav == 8) {
|
|
|
- $kontent = $videoloader;
|
|
|
|
|
|
|
+ $kontent = $config['videoloader'];
|
|
|
}
|
|
}
|
|
|
elseif ($nav == 9) {
|
|
elseif ($nav == 9) {
|
|
|
- $kontent = $imgloader;
|
|
|
|
|
|
|
+ $kontent = $config['imgloader'];
|
|
|
}
|
|
}
|
|
|
elseif ($nav == 10) {
|
|
elseif ($nav == 10) {
|
|
|
- $kontent = $docloader;
|
|
|
|
|
|
|
+ $kontent = $config['docloader'];
|
|
|
}
|
|
}
|
|
|
//Main Content Display Frame goes below
|
|
//Main Content Display Frame goes below
|
|
|
include $kontent;
|
|
include $kontent;
|
|
@@ -123,13 +130,13 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div id="rightbar" class="kontained">
|
|
<div id="rightbar" class="kontained">
|
|
|
<?php
|
|
<?php
|
|
|
- include $rightbar;
|
|
|
|
|
|
|
+ include $config['rightbar'];
|
|
|
?>
|
|
?>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div id="footbar">
|
|
<div id="footbar">
|
|
|
<?php
|
|
<?php
|
|
|
- include $footbar;
|
|
|
|
|
|
|
+ include $config['footbar'];
|
|
|
?>
|
|
?>
|
|
|
</div>
|
|
</div>
|
|
|
</body>
|
|
</body>
|