$htmlclass_path="htmlclass";
#$htmlclass_path="../htmlclass";
include("$htmlclass_path/htmlclass.php");
class sflogo extends image
{
function sflogo($group_id)
{
image::image("http://sourceforge.net/sflogo.php?group_id=$group_id",
"SourceForge Logo",88,31);
}
}
$document = new HTMLdoc();
$document->head->add_child(new html_tag(array(),"PHP::HTML","title"));
$styles=&$document->styles;
$styles->add_style("body","",array("background-color" => "#DDDDFF"));
$styles->add_style("h1","Center",array("text-align" => "center",
"color" => "red",
"font-weight" => "700"));
$styles->add_style("p","",array("margin-left" => "2cm"));
$styles->add_style("p","Note",array("text-align" => "center",
"font-weight" => "bold"));
$styles->add_style("div","webmaster",array("text-align" => "left",
"font-size" => "8",
"font-weight" => "600",
"margin-top" => "25mm"));
$styles->add_style("table","DownloadTable",
array("background-color" => "#AAAAAA",
"text-align" => "center",
"align" => "center"));
$styles->add_style("tr","DownloadHead",
array("background-color" => "#8888FF",
"font-weight" => "700"));
/* I know, this is ugly, but it will be better when i'll finish 4.0.1 */
$document->body->add_child('
');
$document->body->add_child(new html_tag(array("class" => "Center"),"Under Construction","h1"));
$para=&$document->body->add_child(new tag_array(array(),"p"));
$para->add_content("PHP::HTML page is still under construction, and will be available soon");
$para->add_content('PHP::HTML is a set of PHP classes that implements a DOM style approach to HTML documents. The document is an object which contains DOCTYPE, head, styles and body, each of those can contain one or more children, they can be text, tags(with children of their own), or even complex "widgets", such as tables, forms, SideBars, menus, or even a calendar(yes, that was done).');
$para->add_content('I\'m currently in a phase of re-writing PHP::HTML(the old version does not know about styles, and most of the classes don\'t have "children"');
$para->add_content('You may download the two versions below, but please note that while it might be less stable, 0.4b is much more powerful(This page is produced by it)');
$temp=&$document->body->add_child(new para(array("class" => "Note"),""));
$temp->add_child("To see how this page is produced by PHP::HTML, ");
$temp->add_child(new href("index.phps","click here"));
$items =array();
$items[] = array( "name" => "PHP::HTML", "version" => "0.3",
"url" => "http://phphtml.sourceforge.net/phphtml.phps");
$items[] = array( "name" => "PHP::HTML", "version" => "0.4b",
"url" => "http://phphtml.sourceforge.net/htmlclass-0.4b.tar.bz2");
$table=&$document->body->add_child
(new table(array("class" => "DownloadTable","border" => "1","align" =>
"center"),"Download table"));
$table->new_row(array("class" => "DownloadHead"));
$table->add_col(array(),"Name");
$table->add_col(array(),"Version");
$table->add_col(array(),"URL");
foreach ($items as $item)
{
$table->new_row();
foreach ($item as $key => $value) {
if ($key=="url") $value=new href($value,$value);
$table->add_col(array(),$value);
}
}
$document->body->add_child(new sflogo(5318));
$webmaster=&$document->body->add_child(new div(array("class" => "webmaster"),""));
$webmaster->add_child(new href("mailto:idanso@users.sourceforge.net","webmaster"));
echo $document->render();