query("SELECT * FROM `info_pages` ORDER BY `id` ASC"); $page = array(); while($row = $select_pages->fetch_assoc()) { $page[$row['url']] = array(skin::parse($row['title']), skin::parse($row['content']), $row['public']); } $skin = new skin('page/sidebar'); $sidebar = ''; $TMPL['links'] = ''; foreach($page as $url => $value) { if($value[2]) { $class = ''; if($_GET['b'] == $url) { $class = ' sidebar-link-active'; } $TMPL['links'] .= ''; } } $sidebar = $skin->make(); if(!empty($_GET['b']) && isset($page[$_GET['b']][0])) { $b = $_GET['b']; $TMPL['sidebar'] = $sidebar; $TMPL['url'] = $CONF['url']; $TMPL['title'] = skin::parse($page[$b][0]).' - '.$settings['title']; $TMPL['content'] = skin::parse($page[$b][1]); $TMPL['header'] = ''.skin::parse($page[$b][0]).''; $skin = new skin("page/content"); return $skin->make(); } else { header("Location: ".$CONF['url']); } } ?>