西西软件网:最安全的绿色手机软件下载站!
游戏
您当前所在位置:首页 > 软件教程 > 软件教程

OfficeXP_menu(过程版)

时间:2026-01-08 16:52 来源:西西软件网 作者:佚名

过程

<?php
/**
* 仿OfficeXP风格的左边版面列表    
* --------------------------------------------------------------------------------
* blood 于 2/19/2002 4:47:11 PM 加贴在 Visual Basic
*
* 徐祖宁(唠叨) 移植于 2/28/2002
* 更正部分错误
*
*/

if($key == ""):
echo


Menu Sample


          
    
    
  

EOD;
endif;

if($key == "menu"):
/**
*
* $MenuOn                      定义分类菜单数目
* $MenuBackColor               定义分类菜单背景颜色
* $MenuFontSize                定义分类菜单字体
* $MenuBarHeight               定义分类菜单高度
* $ItemTextColor               定义分类菜单项目文字颜色
* $ItemBackColor               定义分类菜单项目背景颜色
* $TopMenuHeight               定义分类菜单与顶部的间距
* $SelectedItemDarkBorder      定义分类菜单项目在鼠标移动到上面时的暗边框颜色
* $SelectedItemLightBorder     定义分类菜单项目在鼠标移动到上面时的亮边框颜色
* $SelectedItemBackgroundColor 定义分类菜单项目在鼠标移动到上面时的背景颜色
* $menuSubSectionBackColor     定义二级菜单背景颜色
* $menuSubSectionFontColor     定义二级菜单菜单字体颜色
* $defTarget                   定义菜单项目超连接默认目标框架
*/
$TopMenuHeight = 0;           //设置分类菜单与顶部的间距
$MenuBarHeight = 20;          //设置分类菜单高度
$MenuFontSize = "9pt";            //设置菜单字体大小

//我们使用仿Office XP风格的外观,也可以使用普通外观。
$menu_mode = false;

if($menu_mode) {
  //普通菜单外观
  $MenuBackColor = "lightgrey";             //设置背景颜色
  $ItemBackColor = "#7f7f7f";               //设置菜单项目背景色
  $ItemTextColor = "#ffffff";               //设置菜单项目文字颜色
  $SelectedItemDarkBorder = "#ffffff";      //设置菜单项目在鼠标移动到上面时的暗边框颜色
  $SelectedItemLightBorder = "#000000";     //设置菜单项目在鼠标移动到上面时的亮边框颜色
  $SelectedItemBackgroundColor = "";        //设置菜单项目在鼠标移动到上面时的背景颜色
  $menuSubSectionBackColor = "lightgrey";   //设置二级菜单背景颜色
  $menuSubSectionFontColor="black";          //设置二级菜单字体颜色
}else {
  //仿Office XP风格外观
  $MenuBackColor = "lightgrey";             //设置背景颜色
  $ItemBackColor = "lightgrey";             //设置菜单项目背景色
  $ItemTextColor = "#000000";               //设置菜单项目文字颜色
  $SelectedItemDarkBorder = "#08246B";      //设置菜单项目在鼠标移动到上面时的暗边框颜色
  $SelectedItemLightBorder = "#08246B";     //设置菜单项目在鼠标移动到上面时的亮边框颜色
  $SelectedItemBackgroundColor = "#B5BED6"; //设置菜单项目在鼠标移动到上面时的背景颜色
  $menuSubSectionBackColor = "darkgray";    //设置二级菜单背景颜色
  $menuSubSectionFontColor = "black";       //设置二级菜单字体颜色
}
$defTarget = "main";    //设置菜单项目超连接默认目标框架

echo

EOD;

$menuOn = 0;             //对菜单数目初始化

/**
* 绘制菜单方法:
* menuStartSection($Seq, $Label)
*   制作分类菜单
*   $Seq = 分类菜单序列号,使用菜单序列号控制启动是显示顺序
*   $Label = 分类菜单标题
* menuAddItem($Label, $Description, $URL, $Target="")
*   制作菜单项目
*   $Label = 项目标题
*   $Description = 项目简介
*   $URL = 超连接地址
*   $Target = 超连接目标框架,默认为$defTarget
* menuAddSubSection($Label)
*   制作二级分类菜单。
*   $Label = 二级分类菜单标题
* menuAddSubSectionLine()
*   制作项目分割线,使用高度为2的图片
* menuEndSection()
*   分类菜单结束
* menuSectionAsItem($Label, $Description, $URL, $Target="")
*   制作带超连接的分类菜单,类似菜单项目,可以直接使用
*   $Label = 分类菜单标题
*   $Description = 分类菜单简介
*   $URL = 超连接地址
*   $Target = 超连接目标框架,默认为$defTarget
*/

/**
* 函数定义
*/
function menuAddItem($itemLabel, $StatusText, $URL, $target="") {
  global $defTarget,
         $SelectedItemDarkBorder,
         $SelectedItemLightBorder,
         $ItemTextColor,
         $SelectedItemBackgroundColor,
         $MenuFontSize ;
  if($target == "") $target = $defTarget;
  $URL = rawurldecode($URL);
  echo
$itemLabel
EOD;
}

function menuAddSubSection($ItemLabel) {
  global $menuSubSectionBackColor,
         $MenuFontSize,
         $menuSubSectionFontColor;
  echo
$ItemLabel
EOD;
}

function menuAddSubSectionLine() {
  echo

  
    
     
       
     
    

  

EOD;
}

function menuSectionAsItem($SectionSeq, $SectionName, $SectionDesc, $URL, $target="") {
  global $defTarget,
         $menuBackColor,
         $MenuBarHeight,
         $MenuFontSize;
  if($target == "") $target = $defTarget;
  $URL = rawurldecode($URL);
  $mh = $MenuBarHeight-2;
  echo


  




  

$SectionName



  


EOD;
}

function menuStartSection($SectionSeq, $SectionName) {
  global $menuBackColor,
         $MenuBarHeight,
         $MenuFontSize,
         $menuSection,
         $ItemBackColor;
  $mh = $MenuBarHeight-2;
  echo


  




  

$SectionName



  



EOD;
}

function menuEndSection() {
  echo


上文就是OfficeXP_menu(过程版)的内容了,文章的版权归原作者所有,如有侵犯您的权利,请及时联系本站删除,更多相关officexp的资讯,请关注收藏西西下载站。
上一篇:length函数用法 下一篇:返回列表
相关文章

玩家评论

精品推荐