<?
//###########################
//# define helper-funx
$http = $HTTP_SERVER_VARS;
function kopfHTML($title="...php driven...") {
echo "<html><head><title>".$title."</title></head>\n";}
function footer() {
echo "</html>";}
function printHTMLEnv( $vars = array( 0 => 'array leer' )) {
foreach( $vars as $key => $val ) {
echo "$key => $val<br>\n";
}
}
// normal header with TITLE and BODY-Tag
function _header( $titel = '') {
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
echo "\n<html><head><title>".$titel."</title></head>\n";
echo '<body>';
echo "\n\n";
}
// meta-header with TITLE, META-Var and BODY-Tag
function _metaheader( $titel = '', $meta = '') {
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
echo "\n<html><head><title>".$titel."</title>\n".$meta."\n</head>\n";
echo '<body>';
echo "\n\n";
}
// normal header with TITLE but WITHOUT BODY-Tag
function _head( $titel = '') {
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
echo "\n<html><head><title>".$titel."</title></head>\n";
}
// a simple BODY-TAG (+attributes)
function _body( $bodyattrib = '') {
echo "\n<body ".$bodyattrib.">\n";
}
// closing the BODY and HTML-document, optionally with a auto-centered Custom-HTML
function _footer($custom_footer = '')
{
if ( $custom_footer ) {
echo "\n<DIV ALIGN=\"CENTER\">".
$custom_footer.
"</DIV>\n</body>\n</html>";}
else {
echo "\n</body>\n</html>";
}
}
// prints anything out... (_very_useful_;) )
function _println( $content = '[line]')
{
$tmpHTML = "\n".$content."<br>\n";
echo $tmpHTML;
return $tmpHTML;
}
|