Commit 18028cb7 authored by Ryan Wade's avatar Ryan Wade

Started Extracting Fake SQL info into separate file and created Placeholder functions

parent 68ec691a
<?php
function getFile($location)
{
$myfile = fopen($location,"r");
return fread($myfile,filesize($location));
}
function SQL_GET_SITE_TITLE()
{
return "My Website";
}
function SQL_GET_SITE_LOGO()
{
return "./logo.png";
}
// ID PID Title Description Image Content
$pages = [[0,-1,"Home" , null , null ,"This is the homepage"],
[1, 0,"Page1" ,"Page 1 Description" , "./title.jpg" ,"This is page 1 html content"],
[2, 0,"Page2" ,"Page 2 Description" , "./title.jpg" ,"This is page 2 html content</br><button>Logon</button>"],
[3, 0,"Page3" ,"Page 3 Description" , "./title.jpg" ,"This is page 3 html content"],
[4, 0,"Page4" ,"Page 4 Description" , "./title.jpg" ,"This is page 4 html content"],
[5, 3,"Page5" , null , null ,"This is SUB page 5 html content"],
[6, 3,"Page6" , null , null ,"This is SUB page 6 html content"],
[7, 3,"Page7" , null , null ,"This is SUB page 7 html content"],
[8, 6,"Page8" , null , null ,"This is SUB SUB page 8 html content"],
];
// Name Password (Hashed) AccessLevel
?>
\ No newline at end of file
<?php
function getFile($location)
{
$myfile = fopen($location,"r");
return fread($myfile,filesize($location));
}
// ID PID Title Description Image Content
$pages = [[0,-1,"Home" , null , null ,"This is the homepage :)"],
[1, 0,"Page1" ,"Page 1 Description" , "./title.jpg" ,"This is page 1 html content"],
[2, 0,"Page2" ,"Page 2 Description" , "./title.jpg" ,"This is page 2 html content</br><button>Logon</button>"],
[3, 0,"Page3" ,"Page 3 Description" , "./title.jpg" ,"This is page 3 html content"],
[4, 0,"Page4" ,"Page 4 Description" , "./title.jpg" ,"This is page 4 html content"],
[5, 3,"Page5" , null , null ,"This is SUB page 5 html content"],
[6, 3,"Page6" , null , null ,"This is SUB page 6 html content"],
[7, 3,"Page7" , null , null ,"This is SUB page 7 html content"],
[8, 6,"Page8" , null , null ,"This is SUB SUB page 8 html content"],
];
// Name Password (Hashed) AccessLevel
include "./fakeSQL.php";
$_GLOBAL["SQL"] = $pages;
$_GLOBAL["Site_Title"] = "My Title";
$_GLOBAL["Site_Logo"] = "./logo.png";
$_GLOBAL["Site_Title"] = SQL_GET_SITE_TITLE();
$_GLOBAL["Site_Logo"] = SQL_GET_SITE_LOGO();
if(isset($_GET["id"]))
$_GLOBAL["pageId"] = $_GET["id"];
else
......@@ -32,7 +16,7 @@
$_GLOBAL["pageTitle"] = $pages[$_GLOBAL["pageId"]][2];
if(isset($pages[$_GLOBAL["pageId"]][3]))
{
$_GLOBAL["pageDesc"] = $pages[$_GLOBAL["pageId"]][3].": This is a description of your page. Use it wisely as you only have a limited amount of space";
$_GLOBAL["pageDesc"] = $pages[$_GLOBAL["pageId"]][3];//.": This is a description of your page. Use it wisely as you only have a limited amount of space";
$_GLOBAL["pageImg"] = $pages[$_GLOBAL["pageId"]][4];
}
$_GLOBAL["pageHTML"] = $pages[$_GLOBAL["pageId"]][5];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment