Welcome to Panglossa Go!Johnny PHP library version 2.1!

[top]

This library was designed with one target in mind: to provide classes allowing the web page designer to deal with only one language, not many. That is, using this library you can focus on the PHP code and simply forget HTML. Create an object of the type "TPage", define a title, add some text; then use the "show()" function and... voilĂ ! The whole HTML+Javascript+CSS thing is done for you!

And, what is better: all page content follows strictly the current web standards, so your page will pass in all tests.

And, what is even better, all content is ready for Ajax! Simply use the function ajax() with any event of any element you want!

Paragraphs, Divisions, Tables, Forms, even MySQL Databases... each element is represented by an object of a specific class with its specific attributes. You can add one object to another, with any level of nesting, without ever getting lost! If you have already worked with nested tables or divs, you know what kind of hell it turns out after three or four levels of nesting... Not anymore! Now you can create your divs or tables independently, set their caracteristics, then add one to the other as necessary!

Creating a page may be as easy as this:

<?php
require_once("classes.php");
$page = new TPage("Hello");
$text = "Hello!";
$page->add($text);
$page->show();
?>

That gives you this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Hello</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="STYLESHEET" type="text/css" href="default.css"></link>
<script type="text/javascript">
<!--
function ajax(anID, dest) {
try{
id = anID;
xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():
new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){}
document.getElementById(id).innerHTML = "[Loading...]";
xmlhttp.onreadystatechange = triggered;
xmlhttp.open("GET", dest);
xmlhttp.send(null);
}

function triggered() {
if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
document.getElementById(id).innerHTML =xmlhttp.responseText;
}
}
-->
</script>
</head>
<body>
<table id="maincontent" width="100%" border="0">
<tr>
<td id="top" colspan="3" align="center" valign="top">
</td>
</tr>
<tr>

<td id="leftcol" width="0%" align="center" valign="top">

</td>
<td id="centercol" width="100%" align="center" valign="top">

<p>Hello!</p>

</td>
<td id="rightcol" width="0%" align="center" valign="top">

</td>

</tr>
<tr><td id="bottom" colspan="3" align="center" valign="top">

</td>

</tr>
</table>
</body>
</html>

Please take a look at our examples:

Below you can get the source code, compressed in .zip format. Examples included.

Webdesign by Panglossa Software.