Quick install

How make a linux jukebox (my old paper)

iTux - English - Italian

Install iSmash on iTux box

INSTALL - English

Search

 

Contribute

 

Do you want to develop iSmash? You can develop code, plugins, create theme or translate iSmash in other languages. Contact me to nixw0rm [at] gmail [dot] com

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>

------------------------------------------------------------------------

HOW TO USE THIS LIBPHTML v0.1:

Include in your php page this line:

include "func.inc.php";

so you can use functions and php classes included in this package

less sample/sample1.php for an example.


MAIN LIBPHTML FUNCTIONS


javascript_load($pathfile)

Load javascript code from $pathfile

centerObject($object) <center>$object</center>

text($label, $tag, $caption, $class) <$tag id="$label">$caption</$tag>


start_web($title, $background, $bgvalue)

Depends by $background value:

if $background=TRUE the code will be

<html><header><title>$title</title></header>
<body background="$bgvalue">

else $background=FALSE the code will be

<html><header><title>$title</title></header>
<body bgcolor="$bgvalue">

end_web() </body></html>

css_load($pathfile)

Load css code from $pathfile

mat2Table($array, $rowNum, $colNum, $border, $tableName)

convert $array array to an html table

dirList($directory=FALSE)

return array with dirs list into $directory

fileList($directory=FALSE, $type=FALSE)

return array with files list with $type extension into $directory

array2Mat($array)

Convert $array array to a matrix

text2Link($text, $link, $window=FALSE)

output: <a href="/site/$link" window="$window">$text</a>

text2LinkJs($text, $link, $window=FALSE)

output: <a href="#null" onclick="$link" window="$window">$text</a>

mkSpace($num)

write &nbsp $num times

img2LinkJs($title, $img, $link, $window=FALSE)

like text2LinkJs() but using <img> instead text

img2Link($title, $img, $link, $window=FALSE)

like previous function using standard link



MAIN LIBPHTML CLASSES


Class Div: used to manage a generic html object

method:

- getId(): return html id of div object

- getHeight(): return html height of div object

- getWidth(): return html width of div object

- getBackground(): return html background value of div object

- getBgcolorOn(): return TRUE if background is a color or FALSE if background is a wallpaper

- setId($newId): set id of current object

- setHeight($newHeight): set height of current object

- setWidth($newWidth): set width of current object

- setBackground($newBackground): set background of current object

- setBgcolorOn($newBgcolorOn): set true or false if use a color as background or wallpaper

- setBgcolor($color): change background color of object

- initDiv($id, $height, $width, $background): initialize object

- setContentDiv($content): change the content between tag object: <tag>$content</tag>

- getDivValue(): get html text string of object

- printDiv(): print current object into web page


class table

- getId(): return html id of table object

- getHeight(): return html height of table object

- getWidth(): return html width of table object

- getBackground(): return html background value of table object

- getBgcolorOn(): return TRUE if background is a color or FALSE if background is a wallpaper

- setId($newId): set id of current object

- setHeight($newHeight): set height of current object

- setWidth($newWidth): set width of current object

- setBackground($newBackground): set background of current object

- setBgcolorOn($newBgcolorOn): set true or false if use a color as background or wallpaper

- setBgcolor($color): change background color of object

- initTable($id, $height, $width, $background), $border: initialize object

- setContentTable($content): change the content between tag object: <tag>$content</tag>

- getTableValue(): get html text string of object

- printTable(): print current object into web page


There are two class: Tr and Td. Method are similar previous.

Sorry for my English, isn't my first language.

For any problems you can contact me to This e-mail address is being protected from spambots. You need JavaScript enabled to view it

nixw0rm, 14 August 2009