Commit 8ae5b88e authored by Ryan Wade's avatar Ryan Wade

Added Administrative Panel. These pages are placeholders and are stored in...

Added Administrative Panel.  These pages are placeholders and are stored in the same way as regular pages to improve code reuse.  This will also make it easier to update the control panel in future releases
parent f17df2a4
<?php
//Include all components
include "./SQL.php";
include "./css.php";
include "./header.php";
include "./nav.php";
include "./title.php";
include "./breadcrumb.php";
include "./body.php";
include "./sitemap.php";
include "./footer.php";
//Initialize SQL database object
$SQL = new SQL();
//Get Basic Site Info
$site_title = "Admin Panel";
$site_logo = $SQL->GET_SITE_LOGO();
//Get ID from HTML GET REQUEST or set to 0
$page_id = 0;
if(isset($_GET["id"]))
$page_id = $_GET["id"];
//Identify special pages and get page info;
$page_title = $SQL->GET_TABLE(2)->GET_ROW($page_id)->GET_ATTRIBUTE(2);
$page_desc = $SQL->GET_TABLE(2)->GET_ROW($page_id)->GET_ATTRIBUTE(3);
$page_img = $SQL->GET_TABLE(2)->GET_ROW($page_id)->GET_ATTRIBUTE(4);
$page_src = $SQL->GET_TABLE(2)->GET_ROW($page_id)->GET_ATTRIBUTE(5);
//Initialize page component objects
$css = new CSS();
$header = new Header($site_title, $site_logo);
$nav = new NAV($SQL->GET_TABLE(2), "admin.php", $page_id);
$title = new Title($page_id, $page_title, $page_desc, $page_img);
$breadcrumb = new Breadcrumb($SQL->GET_TABLE(2), "admin.php", $page_id, $page_title);
$body = new Body($page_src);
//render HTML output
?>
<html>
<head>
<?php $css->render();?>
</head>
<body>
<div id="webpage" class="center">
<div id="navigation">
<?php $header->render(); ?>
<?php $nav->render(); ?>
</div>
<div id="content">
<?php
$title->render();
$breadcrumb->render();
$body->render();
?>
</div>
</div>
</body>
</html>
\ No newline at end of file
......@@ -19,6 +19,15 @@
}
function getAdmin()
{
return null;
return
[new SQL_ROW([0,-1,"Home" , null , null ,"This is the homepage" ]),
new SQL_ROW([1, 0,"Pages" , null , null ,"This is page 1 html content" ]),
new SQL_ROW([2, 0,"Users" , null , null ,"This is page 2 html content</br><button>Logon</button>" ]),
new SQL_ROW([3, 0,"Site Info" , null , null ,"This is page 3 html content" ])
];
}
function getDrafts()
{
}
?>
\ No newline at end of file
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