Officexp_menu_classoop version _php Tutorial

Source: Internet
Author: User
Tags border color dotnet
<title>Menu Sample</title> EOD; }} class About {function run () {echo << body {font-size:9pt; font-family: "Verdana", "Arial", "Song Body";}

About this menu
Description, this menu program can only use in the version of IE 5 or above, netspace can not be used, it is recommended to use IE 6 official Chinese version EOD; }} class Page {function run ($id 1) {global $id; Echo << body {font-size:9pt; font-family: "Verdana", "Arial", "Song Body";}
Welcome to visit $id EOD; }} class Menu {var $MenuOn = 0;//define the number of category menus var $MenuBackColor = "Lightgrey";//define Category menu Background color var $MenuFontSize = "9pt";//fixed Semantic category Menu Font var $MenuBarHeight = 20; Define category Menu Height var $ItemTextColor = "#000000"; Define category menu item text color var $ItemBackColor = "Lightgrey"; Define category menu item background color var $TopMenuHeight = 0; Defines the spacing between the category menu and the top of var $SelectedItemDarkBorder = "#08246B"; Define a Category menu item when the mouse moves to the top of the dark border color var $SelectedItemLightBorder = "#08246B"; Defines the light border color of a category menu item when the mouse is moved to the above var $SelectedItemBackgroundColor = "#B5BED6"; Defines the background color of the category menu item when the mouse moves to the top $menuSubSectionBackColor = "Darkgray"; Defines a two-level menu background color var $menuSubSectionFontColor = "Black"; Defines a level two menu menu font color var $defTarget = "main"; Define menu item Hyperlink default target frame/** * menustartsection ($SEQ, $Label) * Make category menu * $Seq = category Menu serial number, use menu serial number control start is display order * $Label = Category Menu Title */Fun Ction menustartsection ($SectionSeq, $SectionName) {$menuBackColor = $this->menubackcolor; $MenuBarHeight = $this- >MenuBarHeight; $MenuFontSize = $this->menufontsize; $menuSection = $this->menusection; $ItemBackColor= $this->itembackcolor; $MH = $this->menubarheight-2; Echo << Selecteditemdarkborder; $SelectedItemLightBorder = $this->selecteditemlightborder; $SelectedItemBackgroundColor = $this->selecteditembackgroundcolor; $ItemTextColor = $this->itemtextcolor; if ($target = = "") $target = $this->deftarget; $URL = $this->buildurl ($URL); Echo << Menusubsectionbackcolor; $menuSubSectionFontColor = $this->menusubsectionfontcolor; Echo << Menubackcolor; $MenuBarHeight = $this->menubarheight; if ($target = = "") $target = $this->deftarget; $URL = $this->buildurl ($URL); $MH = $this->menubarheight-2; Echo << topmenuheight+ ($this->menubarheight * $this->menuon); Echo << Menufontsize; $MenuBackColor = $this->menubackcolor; Echo << TD {Font-size: $MenuFontSize; font-family: "Verdana", "Arial", "Song Body";} EOD; /** * Create Menu */$this->menustartsection (2, "Code World"); $this->menuadditem ("Joy ASP", "Welcome to Joy ASP", "$PHP _self?key=page&id=joy asp"); $this->menuadditem ("Java World", "Welcome to Java World", "$PHP _self?key=page&id=java World"); $this->menuadditem ("DotNet era", "Welcome to visit DotNet Era", "$PHP _self?key=page&id=dotnet era"); $this->menuadditem ("Visual Basic", "Welcome to Visual Basic", "$PHP _self?key=page&id=visual Basic"); $this->menuadditem ("Delphi", "Welcome to Delphi", "$PHP _self?key=page&id=delphi"); $this->menuendsection (); $this->menustartsection (3, "Happy Moment"); $this->menuadditem ("Traditional jokes", "traditional jokes", "$PHP _self?key=page&id= traditional Jokes"); $this->menuadditem ("Modern Jokes", "modern Jokes", "$PHP _self?key=page&id= Modern Jokes"); $this->menuaddsubsection ("Children's class"); $this->menuadditem ("Campus Jokes", "Campus jokes", "$PHP _self?key=page&id= Campus Jokes"); $this->menuadditem ("Toddler jokes", "toddler jokes", "$PHP _self?key=page&id= toddler Jokes"); $this->menuadditem ("Juvenile jokes", "juvenile Jokes", "$PHP _self?key=page&id= juvenile Jokes"); $this->menuaddsubsectiOnLine (); $this->menuadditem ("High School jokes", "Middle school jokes", "$PHP _self?key=page&id= Middle School jokes"); $this->menuaddsubsection ("adult jokes"); $this->menuadditem ("colored jokes", "colored jokes", "$PHP _self?key=page&id= with colored jokes"); $this->menuadditem ("joke Forest", "joke Forest", "$PHP _self?key=page&id= joke Forest"); $this->menuendsection (); $this->menusectionasitem (3, "Introduction to Menu", "Introduction to Menu", "$PHP _self?key=about"); $this->menustartsection (1, "personal favorites"); $this->menuadditem ("DotNet era", "Welcome to visit DotNet Era", "$PHP _self?key=page&id=dotnet era"); $this->menuendsection (); Set your favorites as the boot menu $this->menuon = 4; $this->scriptout (); echo ""; } } Class Application {var $frame, var $menu, var $page, var $about, function application () {$this->frame = new Frame; $t His->about = new about; $this->page = new page; $this->menu = new Menu; } function Run ($key, $id = "") {switch ($key) {case ' menu ': $this->menu->run (); break; case "page": $this->page-&gt ; Run ($id); Break Case "about": $this->about->run (); Break Default: $this->frame->run (); }}}?> Run ($key, $id);?>

http://www.bkjia.com/PHPjc/532130.html www.bkjia.com true http://www.bkjia.com/PHPjc/532130.html techarticle Menu Sample EOD;} } class About {function run () {echo on this menu description, this menu program can only be used in the version of IE 5 or above, netspace can not be used, the recommended use IE ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.