PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Fauzi Gomez   Easy HTML Class   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: Easy HTML Class
Compose HTML tags programatically
Author: By
Last change:
Date: 10 years ago
Size: 3,212 bytes
 

Contents

Class file image Download
<!DOCTYPE html>


<?php

include ("html.class.php");


//Some Vars
$output = "";

$some_text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.";

$more_text = "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).";

$line_text = "A Simple Line text";

//$input_style = ;

$empty = array();

$empty_box = "just-an-example";





$output .= html::hFromArray(1, $empty, "This is the biginning");

$output .= html::hFromArray(3, $empty, "What if we start?");


$output .= html::divFromArray(array('id'=>'empty_box','class'=>$empty_box), "");

$output .= html::imgFromArray(array('src'=>'http://www.deturno.com/site/templates/jarutile/images/green/logo.jpg','alt'=>'Some logo'));



$some = html::pFromArray(array('id'=>'some_p','value'=>$some_text,'style'=>'padding: 10px 0;color: blue;'));


$output .= html::divFromArray($empty, $some);

$some = "";
for (
$i = 0; $i <10; $i++){
   
$puit = $line_text.' '.$i;
   
$some .= html::liFromArray($empty, $puit);
}

$some = html::ulFromArray($empty, $some);


$output .= html::divFromArray($empty, $some);



$output .= html::divFromArray(array('id'=>'empty_box','class'=>$empty_box), "");





$output .= html::hFromArray(1, $empty, "What about inputs and buttons?");;

$some = html::inputFromArray(array('type'=>'text', 'label'=>'Input 1:','placeholder'=>'Some input'));

$output .= html::divFromArray(array('id'=>'inputs'), $some);

$output .= html::hFromArray(3, $empty, 'A select perhaps');


$sapo[] = '---- Select One ----';

for(
$i =0; $i < 7; $i++){
   
$sapo['value'.$i] = "Select ".$i;
}
//var_dump($sapo);

$some = html::selectFromArrays(array( 'label'=>'Select some'), $sapo);




$buton = html::buttonFromArray(array('value'=>'Hit me','onclick'=>'alert(\'You just saved some Tags, isnt that great? \n If you take a look at the code you will see only one line \nThat means faster loads\')'));

$output .= html::divFromArray(array('id'=>'inputs'), $some.$buton);



$output = html::bodyFromArray($empty, $output);
$output = html::createHtml($output);




echo
$output;

?>