Commit 85262474 by Aleksandar Hristov

Concept changed

1 parent 0223ee00
<?php
require "libs/Smarty.class.php";
$db = new SQLite3('wiki.db');
$smarty = new Smarty;
$current_page=$_SERVER['SCRIPT_NAME'];
$current_page=str_replace(".php", "", $current_page);
function sidebar_navigation()
{
global $db, $smarty;
$page = $db->query("SELECT * FROM page");
$num_pages = count($page);
$menu_pages=array();
$i=0;
while ($row=$page->fetchArray())
{
$menu_pages[$i]=$row[1];
$i++;
}
return $menu_pages;
}
$smarty->assign("menu_pages", sidebar_navigation());
$smarty->assign("page_title", "Slimspots Wiki");
$smarty->assign("current_page", $current_page);
//$smarty->assign("menu_sections", $menu_sections);
$smarty->display('index.tpl');
?>
\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!