Login   Register  
PHP Classes
elePHPant
Icontem

File: menu.php3

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Pierre Marceau  >  basicMenu  >  menu.php3  >  Download  
File: menu.php3
Role: ???
Content type: text/plain
Description: Menu setup and instantiation
Class: basicMenu
Author: By
Last change:
Date: 2000-05-15 03:48
Size: 3,508 bytes
 

Contents

Class file image Download
<?php

/*
==============================================================
This script 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.

Copyright (c) 2000 Pierre Marceau.  You may  freely  use
and  redistribute  under the  terms of the  GNU General Public
License.
--------------------------------------------------------------
     Class basicmenu - http://www.skynet.ca/~pierre/

Written on May 14, 2000, under PHP 4.0 RC1 ModPHP and IE 5.0.
Tested NN 4.6 and PHP 3.14 Win2000 IIS 5.0 ... ok.

      Comments, suggestions and bug reports welcome!
==============================================================
*/

require "basicmenu.inc";
$mymenu = new basicmenu;

$mymenu->myfontsize        = "9";           // font point size
$mymenu->mySearchFieldSize = "3";           // search field size
$mymenu->mymenuwidth       = "90";          // menu pixels wide
$mymenu->mycolor           = "navajowhite"; // text color
$mymenu->myactivecolor     = "white";       // active text color
$mymenu->mybgcolor         = "red";         // background color
$mymenu->mystartpage       = "http://phpclasses.upperdesign.com/";
                                            // initial page to load

/*
Though technically not required, long lines can be assigned to
variables to avoid having super long and messy lines in the
menu code.
*/

$homepage            = "<font color=\"gold\" size=\"+1\">Home</font>";

$longMenuItem        = "<i><b><font size=\"+2\">PHP</font></b></i>";

$evenLongerMenuItem  = "<marquee><i><b><font color=\"white\" size=\"-2".
                       "\">&copy;2000 Pierre Marceau</font></b></i>".
                       "</marquee>";

/*
You can have <hr> type separator lines in your menu, simply use
LINE1 as the array 'key', the corresponding 'value' can be "".
Array keys must be unique so when you need multiple separator lines,
key them like this LINE1, LINE2 ... LINE9 if you use up 1 thru 9 go
ahead and use A thru Z. If you use up A thru Z then, IMHO, you have
too many separator lines in your menu. (Then again, you already reached
that point when you used up LINE9.)

SEARCH is another special 'key', set its corresponding 'value' to the
search engine you will submit to. Study and, if need be, modify the
class to get this feature working. As you will see, the variable
$bmquery is sent via post method to the search page. This page will
do what it does with this variable and send back the results, but thats
another subject.
*/

$mymenu->mylinks[$homepage]            = "/"; 
$mymenu->mylinks["LINE1"]              = "";
$mymenu->mylinks["Classes"] = "http://phpclasses.upperdesign.com/"; 
$mymenu->mylinks[$longMenuItem]        = "http://www.php.net/";
$mymenu->mylinks["Weberdev"]           = "http://www.weberdev.com/";
$mymenu->mylinks["<kbd>GNU</kbd>"]     = "http://www.gnu.org/";
$mymenu->mylinks["LINE2"]              = "";
$mymenu->mylinks["EditPHP"]            = "http://www.skynet.ca/~pierre/";
$mymenu->mylinks["Lycos"]              = "http://www.lycos.com/";
$mymenu->mylinks["LINE3"]              = "";
$mymenu->mylinks[$evenLongerMenuItem]  = "http://www.skynet.ca/~pierre/";
$mymenu->mylinks["LINE4"]              = "";
$mymenu->mylinks["SEARCH"] = "http://www.mysite.com/mySearchEngine.php3"; 

$mymenu->main();
?>