Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Roberto Turcios  >  Tab Menu Generator  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: A tab Menu Example
Class: Tab Menu Generator
Generate HTML tab menu with switchable pages
Author: By
Last change: path to example bullet
Date: 2004-09-25 05:34
Size: 2,464 bytes
 

Contents

Class file image Download
<? include('tabmenu_class.php') ; 
$tab=new tabs;


### UNCOMMENT TO TEST SOME VARIATIONS

##### FULL TABS OR JUST MENU####3
//if just the tab menu is wnated this var must be set to 1; else 0
//the actions will work fine.
//$tab->just_menu=1;

##### L O O K ######
//$tab->draw_bullet=0;
$tab->bullet_image='http://209.15.107.121/images/bullet.gif';
//$tab->bullet_image='http://209.15.107.121/images/ioff.gif';
//$tab->bullet_h=1;
//$tab->bullet_pos='L';
//$tab->separation=5;
//$tab->separation=-3;
//$tab->border_type='dashed';//dashed,dotted,solid,none
//$tab->border_width=2;
//$tab->border_color='blue';
//$tab->active_color='#FDB01D';
//$tab->over_color='#FFCC33';
#try all the other vars.

###TITLES####
//$tab->array_heads=array('Here goes #1','Here goes #2','Here goes #3','And so On','and on');

#### A C T I O N S ######
/*#COMMENT STARTS

$tab->array_contents=array('Using css to change individually on click','Some iframes:<br><iframe src="http://phpclasses.org" width="100%" height="100%"></iframe>','<table border="1" width="100%"><tr><td bgcolor="#FFFFCC">HTML content and some javascript</td></tr></table>');
$tab->array_actions=array();$action = array();
//simple javascript
$action[] = array(0=>2,1=>'alert(\'HELLO\')');

//change position or color using javascript and css.
$action[]=array(0=>0,1=>'document.all.id0.className=\'example\';');
$action[]=array(0=>1,1=>'document.all.id1c.style.top=\'45px\';');//if just_menu is set; this will give a javascript error.
foreach($action as $saction){//fill the array_actions
    $tab->array_actions[]=$saction;
    }
#COMMENT ENDS*/
    
    
?>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!--this style is used in the action(when uncommented) performed by clicking the tab #1-->
<style type="text/css">
<!--
.example {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: bolder;
    font-variant: normal;
    color: #333333;
    background-color: #A0AA5C;
    text-decoration: none;
    margin: 0px 0px 0px 0px;
    padding-top: 3px;
    padding-right: 0.5em;
    padding-bottom: 3px;
    padding-left: 0.5em;
    border-top: 1px solid #666666;
    border-right: 1px solid #666666;
    border-bottom: 1px none #666666;
    border-left: 1px solid #666666;
    text-transform: none;
    cursor: hand;
}
-->
</style>
</head>

<body>
<? $tab->make_tab(); ?>
</body>
</html>