Example #1
0
are displayed in a text area for copypasting.  If format=normal
or is not given, then the usual HTML format is used.*/
require_once 'common.inc';
$isloggedin = startpage(UNRESTRICTED);
try {
    if (!isset($_GET['id']) or !$_GET['id']) {
        throw new Exception("No category id was specified");
    }
    $id = $_GET['id'];
    if (isset($_GET['format']) and $_GET['format'] == 'bbcode') {
        $format = 'bbcode';
    } else {
        $format = 'normal';
    }
    $category = Database::get_category_by_id($id);
    $clues = Database::get_clues_for_category($id, true);
    $title = strip_tags($category->name);
} catch (Exception $e) {
    $title = "Error viewing category.";
    $errortext = $e->getMessage();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
<link rel="stylesheet" type="text/css" href="theme.css" />
<link rel="icon" type="image/png" href="shcicon.png" />
<title><?php 
echo $title;
?>