<?php
// Blocks
// v0.1
// 2004-4-20 17:04
// Powered By TERN
// Set blocks class
class Blocks
{
var $color; //
var $time; //
var $text; //
function set_color($color)
{
$this->color = $color;
}
function set_time($time)
{
$this->time = $time;
}
function set_text($text)
{
$this->text = $text;
}
function get_color()
{
return $this->color;
}
function get_time()
{
return $this->time;
}
function get_text()
{
return $this->text;
}
//Set HTML output
function blocks()
{
$blocks = "
<!--START: BLOCKS ///////////////////////////////////////////////////////////-->
<tr>
<td class=\"".$this->color."\">
<table width=\"200\" cellspacing=\"0\">
<tr>
<td class=\"TimeBlocks\">
".$this->time."
</td>
</tr>
</table>
".$this->text."
</td>
</tr>
<!--END: BLOCKS /////////////////////////////////////////////////////////////-->
<!-----------------------------------------------------><tr><td> </td></tr>
";
return $blocks;
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<!-- Creation Date: 2004/5/16 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Dev-PHP 1.9.4">
<title>Blocks example</title>
<STYLE type="text/css">
<!--
/* Set blocks color of the Yellow */
.BigBlocks_Yellow {
border: 1px dotted #C0C0C0;
background-color: #FFFFCC;
font-size:9pt;
}
/* Set blocks color of the Yellow01 */
.BigBlocks_Yellow01 {
border: 1px dotted #C0C0C0;
background-color: #FFEEAB;
font-size:9pt;
}
/* Set blocks color of the Blue */
.BigBlocks_Blue {
border:1px dotted #C0C0C0;
background-color: #E7F2FF;
font-size:9pt;
}
/* Set blocks color of the Blue01 */
.BigBlocks_Blue01 {
border:1px
solid #0cf;
background-color: #E7F2FF;
font-size:9pt;
}
/* Set time blocks color of the white */
.TimeBlocks {
border: 1px dotted #C0C0C0;
background-color: #FFFFFF;
font-size:9pt;
}
-->
</STYLE>
</head>
<body>
<table>
<?php
$my_Blocks = new Blocks; // new opjects
$my_Blocks->set_color("BigBlocks_Blue"); // Set blocks color
$my_Blocks->set_time("2004-04-21 10:16:57"); // Set blocks time
$my_Blocks->set_text("
none
"); // Set blocks text
echo $my_Blocks->blocks(); // show
?>
<?php
$my_Blocks = new Blocks;
$my_Blocks->set_color("BigBlocks_Yellow");
$my_Blocks->set_time("2004-04-21 10:16:57");
$my_Blocks->set_text("
none
");
echo $my_Blocks->blocks();
?>
<?php
$my_Blocks = new Blocks;
$my_Blocks->set_color("BigBlocks_Blue01");
$my_Blocks->set_time("2004-04-21 10:16:57");
$my_Blocks->set_text("
none
");
echo $my_Blocks->blocks();
?>
<?php
$my_Blocks = new Blocks;
$my_Blocks->set_color("BigBlocks_Yellow01");
$my_Blocks->set_time("2004-04-21 10:16:57");
$my_Blocks->set_text("
none
");
echo $my_Blocks->blocks();
?>
</table>
</body>
</html>
|