Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Rafat Katta  >  dyna_menue  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Example for use the class library
Class: dyna_menue
Build an hierarchic menu with dynamic HTML
Author: By
Last change:
Date: 8 years ago
Size: 2,421 bytes
 

Contents

Class file image Download
<?
include_once("lib.menue.class.inc");
//Text Hyper Link
$oLink=new CTextLinks('http://gsibc.net','My Web Site');
//Grafik with Link
$ogLink=new CGLinks('http://gsibc.net','logo.jpg');
$ogLink->setIMGWidth(40);// set Image Property
$ogLink->setIMGHight(40);// srt Image Property
$oLink->showHtml();// show the text Link
echo '<br>';
$ogLink->showHtml();// show Image Link
echo "<br>";
//creat Menue Blok Text Menue Block Static
$oBlock=&new CMenueBlock("My_FirstMenue");
// Menue Block Elements
$oTextlink0=&new CTextMenueElem('http://gsibc1.net','My Web Site1',$oBlock);
$oTextlink1=&new CTextMenueElem('http://gsibc2.net','My Web Site2',$oBlock);
$oTextlink2=&new CTextMenueElem('http://gsibc3.net','My Web Site3',$oBlock);
$oTextlink3=&new CTextMenueElem('http://gsibc4.net','My Web Site4',$oBlock);
$oTextlink4=&new CTextMenueElem('http://gsibc5.net','My Web Site5',$oBlock);
$oBlock->showHtml();
echo 
"<br>";
// create Menue List Dynamic with java script
$oMenueList=new CMenueList(true);
// First Block
$oMenueBlock[0]=& new CMBlock("My_FirstMenue",$oMenueList);
// Menue Block Elements
$oTextlink[0]=&new CTextMenueElem('http://gsibc1.net','My Web Site1',$oMenueBlock[0]);
$oTextlink[1]=&new CTextMenueElem('http://gsibc2.net','My Web Site2',$oMenueBlock[0]);
$oTextlink[2]=&new CTextMenueElem('http://gsibc3.net','My Web Site3',$oMenueBlock[0]);
$oTextlink[3]=&new CTextMenueElem('http://gsibc4.net','My Web Site4',$oMenueBlock[0]);
$oTextlink[4]=&new CTextMenueElem('http://gsibc5.net','My Web Site5',$oMenueBlock[0]);
// Secound Block
$oMenueBlock[1]=& new CMBlock("My_Secound_Menue",$oMenueList);
// Menue Block Elements
$oTextlink[0]=&new CTextMenueElem('http://gsibc1.net','My Web Site1',$oMenueBlock[1]);
$oTextlink[1]=&new CTextMenueElem('http://gsibc2.net','My Web Site2',$oMenueBlock[1]);
$oTextlink[2]=&new CTextMenueElem('http://gsibc3.net','My Web Site3',$oMenueBlock[1]);
$oTextlink[3]=&new CTextMenueElem('http://gsibc4.net','My Web Site4',$oMenueBlock[1]);
$oTextlink[4]=&new CTextMenueElem('http://gsibc5.net','My Web Site5',$oMenueBlock[1]);
//Third Block
$oMenueBlock[2]=& new CMBlock("My_Theard_Menue",$oMenueList);
// Menue Block Elements
$ogTLink[0]=& new CGTMenueElem('http://gsibc6.net','logo.jpg','GSIBC6',$oMenueBlock[2]);
$ogTLink[1]=& new CGTMenueElem('http://gsibc7.net','logo.jpg','GSIBC7',$oMenueBlock[2]);

$oMenueList->showHtml();
?>