Tärning | Visa källkod | Hangman | XHTML | CSS | How to become a hacker

Visa källkod

Nedanstående filer finns i denna katalogen. Klicka på en fil för att visa dess innehåll.

dice6/

CDice.php
CDiceSvg.php
CHistogram.php
FDice.php
FHistogram.php
common.php
dice.php
source.php
template.php

template.php
<?php
// ===========================================================================================
//
// template.php
//
// Description: Min snygga template
//
// Author: Mikael Roos
//


// -------------------------------------------------------------------------------------------
//
// Error handling on/off
//
error_reporting(E_ALL | E_STRICT);
$debug = "";
$debugEnable = TRUE;  // TRUE to enable debugging, FALSE to not print out debug information


// -------------------------------------------------------------------------------------------
//
// Take care of GET variables
//
$char            = (empty($_GET['char'])            ? "" : $_GET['char']);


// -------------------------------------------------------------------------------------------
//
// The content of the page
//
$html = <<<EOD
<div>
<h1>Min Template</h1>
<p>
Här kommer sidans innehåll.
</p>
</div>

EOD;


// -------------------------------------------------------------------------------------------
//
// Create and print out the html-page
//
require_once('common.php');
$title         = "Min template";
$charset     = "iso-8859-1";
$language    = "sv";

$html = <<< EOD
<?xml version="1.0" encoding="{$charset}" ?> 
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$language}" lang="{$language}">  
    <head>
        <meta http-equiv="Content-Type" content="text/html; {$charset};" />
        <title>{$title}</title>
    </head>
    <body>
        {$header}
        {$html}
        {$footer}
    </body>
</html>
EOD;

header("Content-Type: application/xhtml+xml; charset={$charset}");
echo $html;
exit;

?>
 .                        
..:    © Mikael Roos, 2009