PHP Classes

File: test_finetable.php

Recommend this page to a friend!
  Classes of Peter Klauer   finetable   test_finetable.php   Download  
File: test_finetable.php
Role: Example script
Content type: text/plain
Description: used to test finetable, demo
Class: finetable
Panels with rounded corners
Author: By
Last change: Minor changes: # odds cleaned.
Date: 22 years ago
Size: 11,534 bytes
 

Contents

Class file image Download
<?php /* * Filename.....: test_finetable.php * Aufgabe......: Test- and Demo script for finetable.php * Parameter....: none * Erstellt am..: 28. März 2002 * _ __ _ _ * ||| | |/ / (_) | Wirtschaftsinformatiker IHK * \. ./| ' / _ __ _| |_ ___ www.ingoknito.de * - ^ -| < | '_ \| | __/ _ \ * / - \| . \| | | | | || (_) | Peter Klauer * ||| |_|\_\_| |_|_|\__\___/ 06131-651236 * mailto.......: knito@knito.de * * Changes: * 2002-10-07: Some minor # - odds cleaned. * 2002-05-20: Added multiple includes for finetable.php to test the new feature. * 2002-05-15: Added a &nbsp; after the last changebodybgcolor() in the link section * this stops netscape from showing a blue bar. * 2002-05-01: changed "links to pages..." part to use the class ftable * and demonstrate the new function changebodybgcolor() * 2002-04-14: changed class descriptors from "ft_caption" and "ft_body" * to "ftcaption" and "ftbody" in the css style suit section * 2002-04-02: Changed $me to point to the much shorter ft_img.php * 2002-04-01: Show how the class wrapper works. * My big sister corrected the page where the english was not so good. * 2002-03-30: Some finetables have another captionbgcolor */ // Testing the new feature: // finetable does not produce errors when loaded more than one time include 'finetable.php'; include '../inc_new_label.php'; include 'inc_ftudf.php'; // tidy-check $nl = new new_label; ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> <meta name="keywords" content="PHP,Script,skript,download,table, finetable,runde,Ecke,rounded,corners,corner"> <meta name="description" content="Skript zum Erzeugen von Tabellen mit runden Ecken. Script to generate tables with rounded corners."> <title>Finetable Skript</title> <style type="text/css"> <!-- body, td, p, div{ font-family: Arial, sans-serif; } A,A:FOCUS, A:LINK, A:VISITED { text-decoration:none; color : navy; background-color: transparent;} A:HOVER, A:ACTIVE { text-decoration:underline; color : red; background-color: transparent;} <?php # $style is set when the page is called from itself by clicking on a style-example # in the css style-suits-section. # if set, then here comes some code. This styles shall only show how different a # finetable may look. You can make better looking styles! if( isset( $style ) ) { switch( $style ) { case 1: echo ".ftcaption { font-weight:bold; font-family:monospace;}". "\n.ftbody { font-family:Arial,sans-serif; font-size: 80%; }"; break; case 2: echo ".ftcaption { font-weight:bold; font-size:120%; ". "font-family:'Comic Sans MS',helvetica;}". "\n.ftbody { font-family: Arial, sans-serif; font-size: 80%; color: navy; }"; break; case 3: echo ".ftcaption { font-weight:bold; font-size:120%; font-family: serif; }". "\n.ftbody { font-size: 80%; color: #800000; font-family:monospace;}"; break; case 4: echo ".ftbody { FONT-SIZE:10pt; color:#000099; font-weight:bold; FONT-FAMILY: Helvetica, Arial, sans-serif; }". "\n.ftcaption{ FONT-SIZE:14pt; color:#000080; font-weight:bold; FONT-FAMILY: Helvetica, Arial, sans-serif; }"; break; } } ?> --> </style> </head> <body bgcolor="#CCCCCC"> <?php # upper half of the outer table with navy colored background, 20 pt radius corners # is printed using the class ftable. # advantage: no need to remember the radius and bgcolor at the end of the script # just put $outer->printbottom(); $outer = new ftable; $outer->bodybgcolor = '000080'; // this is navy. All colour values must be hex. $outer->captionbgcolor = '000080'; $outer->caption = '<a href="http://www.ingoknito.de">'. '<font color=white><big>www.ingoknito.de</big></font></a> '. '<font color="cyan">introducing "FINETABLE" '. '<small>all panels below are <b>finetables</b></small></font>'; $outer->radius = 20; $outer->lineheight=3; $outer->linecolor='CCCCCC'; $outer->printtop(); # this table separates the finetables. It is the skeleton of the page. echo '<table summary="finetable demo and introduction page" cellpadding=0 cellspacing=0>'. '<colgroup><col width="50%"><col><col width="50%"></colgroup>'. '<tr valign=top><td>'; # example using the class method. # There is no need to remember the sequence of parameters when using the class. $inner = new ftable; $inner->caption = '<span title="Das ist die Caption einer finetable">FINETABLE</span>'; $inner->bodytext = '<span title="Das ist der body einer finetable">'. '<b>finetable.php</b> erzeugt Panels mit einer Überschrift, einer Trennlinie '. 'und dem Text mit abgerundeten Ecken. '. 'Es ist nicht mehr notwendig, abgerundete Ecken zu zeichnen, '. 'um sie anschließend in den Tabellenquelltext einzufügen. '. 'Mit <b>finetable.php</b> wird dieser Effekt automatisch erzielt. '. '<b>finetable.php</b> ist ein PHP3/4 - Skript, das bereits alle '. 'benötigten Elemente für eine Tabelle mit abgerundeten Ecken enthält. '. 'Die CSS-Klassen ".ft_caption" und ".ft_body" werden, falls definiert, '. 'auf die Überschrift und den Inhalt der Table angewandt. '. 'Die Style-Links im Abschnit "CSS style suits" zeigen ein paar mögliche Variationen.'. '</span>'; $inner->captionbgcolor = 'FFFFFE'; $inner->bodybgcolor = 'FFFFCC'; $inner->printall(); // output the table #keep 4 pixels distance blanker( 100,4 ); # # finetable printed using the imperative method. finetable('CSS style suits', '<a href="test_finetable.php?style=0">No Style</a> '. '<a href="test_finetable.php?style=1">Style 1</a> '. '<a href="test_finetable.php?style=2">Style 2</a> '. '<a href="test_finetable.php?style=3">Style 3</a> '. '<a href="test_finetable.php?style=4">Style 4</a> '); blanker( "100", 4 ); # making two adjacent cells with a table echo '<table summary="" cellpadding=0 cellspacing=0><tr valign=top><td>'; # # the "Made in Germany" - Banner is done with finetable-Parts # echo ft_table_start(150); echo ft_outline( 1, 2, 12, '808080' ); echo ft_inline( '<center><font color="#FFCC00">Made</font></center>', 1, 12, '000000' ); echo ft_inline( '<center><font color="#FFCC00">in</font></center>', 1, 12, 'FF0000' ); echo ft_inline( '<center><font color="#000000">Germany</font></center>', 1, 12, 'FFCC00' ); echo ft_outline( 4, 3, 12, '808080' ); echo ft_table_stop(); echo '</td><td>'.ft_blank(4,20).'</td><td>'; # # finetable was written for the Schemenau Internetauktion # finetable( '<img src="../../schemenau/images/adler_mini.gif" alt="">'. '&nbsp;<font color="#FFFFFF">Working&nbsp;Demo</font>', '<a href="http://schemenau-auktion.dyndns.org/auktion/index.php3?k=1"'. '><font color="#FFFFFF"><b>Schemenau Internet&shy;auktion</b></font></a>'. '<font color="#FFFFFF">, die Spielzeug&shy;auktion</font>', 'FFCC00', 2, 12, '100%', '3050AA' ); echo '</td></tr></table>'; blanker( "100", 4 ); finetable( 'PHP class sources', '<table summary="" cellpadding=0 cellspacing=0><tr valign=top><td>'. 'You can get <b>finetable</b> also from '. '<a href="http://knito.users.phpclasses.org/browse.html/package/510.html" target=_blank>'. 'phpclasses:finetable</a>. At <a href="http://knito.users.phpclasses.org/" target=_blank>phpclasses</a> '. 'every day new classes are added. Join the newsletter!'. '</td><td>&nbsp;&nbsp;</td><td>'. '<script type="text/javascript" src="http://knito.users.phpclasses.org/browse.html/latest/latest.js"></script>'. '</td></tr></table>' , 'AFAFAF', $lineheight=3, $radius=12, $width='300', $bgcolor='AAFFAA', $summary='', $captionbgcolor='FFFFFF' ); // new on marc echo '</td><td>'.ft_blank(4,4).'</td><td>'; // another table, this time without the echo: finetable does it all finetable('<span title="This is the caption of a finetable">FINETABLE</span>', '<span title="This is the body of a finetable">'. '<b>finetable.php</b> gererates panels with a caption, a separating line, '. 'and text with rounded corners. '. 'You no longer need to make rounded corner graphics '. 'and put them into the table source code. '. 'With <b>finetable.php</b>, you achieve this effect automatically. '. '<b>finetable.php</b> is a PHP3/4 script, which includes all elements '. 'needed to create a table with rounded corners. '. '<b>finetable.php</b> applies the user-defined css classes '. '".ft_caption" and ".ft_body" if specified to the caption and the body '. 'of the table. The style links in the "CSS style suits" will show you '. 'some possible styles.'. '</span>', '000000',1, 12, '100%', '9FFFFF', '', 'CFFFFF'); blanker( "100", 4 ); finetable( 'Download and Version-Info', '<b>finetable.php</b> can be downloaded and the latest version info can be '. 'seen <a href="download.php"><u><b>[here]</b></u></a>. '. 'Feel free to link to this page, if you like it. '. '<br><b>finetable.php</b> &copy; 2002 by '. '<a href="mailto:knito@knito.de?subject=finetable">knito</a>'); blanker( "100", 4 ); $ft = new ftable; $ft->caption = 'Links to pages which use <b>finetable.php</b>'; $ft->linecolor = '000000'; $ft->captionbgcolor = 'FFEE00'; $ft->bodybgcolor = 'FFCC00'; $ft->printtop(); ?> <table summary="" cellpadding=0 cellspacing=4> <tr valign=top><td> <a href="mailto:knito@knito.de?subject=Link+to+a+finetable+page">Em@il</a> your link to me, I will add it right here, if it points to a finetable-page.<br> </td><td> <?php echo tidy_check(); ?> </td></tr> <tr><td colspan=2> <?php ####################################################### # Besucherzähler von Andrepolo # bzaehler_v 1.03 ####################################################### # Info: andrepolo@gmx.de # I-Net: http://www.andrepolo.de # Dieses Script ist Freeware !!! ####################################################### include 'bzaehler.php'; // bzaehler wurde von php4 auf php3 umgestellt. (knito) ?> </td></tr></table> <!-- The links start right here --> <?php $ft->changebodybgcolor( "EFEFEF"); ?> <a href="http://koti.mbnet.fi/fldx/index.php" target=_blank>Finnish International DX group Foxtrot Lima</a> <?php $nl->put('2002-09-23'); ?> <?php $ft->changebodybgcolor( "FFDD80"); ?> <a href="http://www.knito.de/besserwisser/farbmisch.php3" target=_blank>Knito's Farbmischer</a> <?php $ft->changebodybgcolor( "EFEFEF"); ?> <a href="http://www.pedleyonline.com" target=_blank>Julian Pedley's Personal Pages</a> <?php $ft->changebodybgcolor( "FFDD80"); ?> <a href="http://www.schemenau.de/devk.php" target=_blank>DEVK-Beratungsstelle Nieder-Olm</a> <?php $ft->changebodybgcolor( "EFEFEF"); ?> <a href="http://www.knito.de/linkdelphi.php3" target=_blank>Knito's Delphi Page</a> <?php $ft->changebodybgcolor( "FFCC00"); ?> &nbsp; <?php $ft->printbottom(); echo '</td></tr></table>'; $outer->printbottom(); // End of outer Table. ?> </body> </html>