str_replace('%s', '(\w{1,8})', preg_quote(BOARD_PATH, '/')) ); if(preg_match('/^\/?$/', $query)) { // Dashboard // Body $body = ''; $body .= '
Boards' . ulBoards() . '
'; die(Element('page.html', Array( 'index'=>ROOT, 'title'=>'Dashboard', 'body'=>$body ) )); } elseif(preg_match('/^\/' . $regex['board'] . '(' . preg_quote(FILE_INDEX, '/') . ')?$/', $query, $matches)) { // Board index $boardName = $matches[1]; // Open board openBoard($boardName); echo Element('index.html', index(1)); } else { error("Page not found."); } } // Close the connection in-case it's still open sql_close(); ?>