Home php教程 php手册 仿OfficeXP风格的左边版面列表

仿OfficeXP风格的左边版面列表

Jun 21, 2016 am 09:08 AM
gt lt quot style this

/**
* 仿OfficeXP风格的左边版面列表
* --------------------------------------------------------------------------------
* blood 于 2/19/2002 4:47:11 PM 加贴在 Visual Basic
*
* 徐祖宁(唠叨) 移植于 3/2/2002
* OOP 版
*
*/

class Frame {
function run() {
global $PHP_SELF;
echo


Menu Sample







EOD;
}
}

class About {
function run() {
echo






关于此菜单




说明,此菜单程序只能使用在IE 5以上的版本使用,NetSpace下不能使用,推荐使用IE 6正式中文版


EOD;
}
}

class Page {
function run($id1) {
global $id;
echo






欢迎访问 $id


EOD;
}
}

class Menu {
var $MenuOn = 0; //定义分类菜单数目
var $MenuBackColor = "lightgrey"; //定义分类菜单背景颜色
var $MenuFontSize = "9pt"; //定义分类菜单字体
var $MenuBarHeight = 20; //定义分类菜单高度
var $ItemTextColor = "#000000"; //定义分类菜单项目文字颜色
var $ItemBackColor = "lightgrey"; //定义分类菜单项目背景颜色
var $TopMenuHeight = 0; //定义分类菜单与顶部的间距
var $SelectedItemDarkBorder = "#08246B"; //定义分类菜单项目在鼠标移动到上面时的暗边框颜色
var $SelectedItemLightBorder = "#08246B"; //定义分类菜单项目在鼠标移动到上面时的亮边框颜色
var $SelectedItemBackgroundColor = "#B5BED6"; //定义分类菜单项目在鼠标移动到上面时的背景颜色
var $menuSubSectionBackColor = "darkgray"; //定义二级菜单背景颜色
var $menuSubSectionFontColor = "black"; //定义二级菜单菜单字体颜色
var $defTarget = "main"; //定义菜单项目超连接默认目标框架

/**
* menuStartSection($Seq, $Label)
* 制作分类菜单
* $Seq = 分类菜单序列号,使用菜单序列号控制启动是显示顺序
* $Label = 分类菜单标题
*/
function menuStartSection($SectionSeq, $SectionName) {
$menuBackColor = $this->menuBackColor;
$MenuBarHeight = $this->MenuBarHeight;
$MenuFontSize = $this->MenuFontSize;
$menuSection = $this->menuSection;
$ItemBackColor = $this->ItemBackColor;
$mh = $this->MenuBarHeight-2;
echo









$SectionName







EOD;
}

/**
* menuSectionAsItem($Label, $Description, $URL, $Target="")
* 制作带超连接的分类菜单,类似菜单项目,可以直接使用
* $Label = 分类菜单标题
* $Description = 分类菜单简介
* $URL = 超连接地址
* $Target = 超连接目标框架,默认为$defTarget
*/
function menuSectionAsItem($SectionSeq, $SectionName, $SectionDesc, $URL, $target="") {
$menuBackColor = $this->menuBackColor;
$MenuBarHeight = $this->MenuBarHeight;

if($target == "") $target = $this->defTarget;
$URL = $this->buildURL($URL);
$mh = $this->MenuBarHeight-2;
echo









$SectionName






EOD;
}

/**
* 将超连接中的空格替换为+号
*/
function buildURL($inURL) {
return str_replace(" ","+",$inURL);
}
/**
* 输出javascript脚本
*/
function scriptOut() {
$dh = $this->TopMenuHeight+($this->MenuBarHeight * $this->menuOn);
echo

EOD;
}

function run() {
global $PHP_SELF;
$MenuFontSize = $this->MenuFontSize;
$MenuBackColor = $this->MenuBackColor;
echo

EOD;

/**
* 创建菜单
*/
$this->menuStartSection(2, "代码世界");
$this->menuAddItem("Joy ASP", "欢迎访问Joy ASP", "$PHP_SELF?key=page&id=Joy ASP");
$this->menuAddItem("Java 世界", "欢迎访问Java 世界", "$PHP_SELF?key=page&id=Java 世界");
$this->menuAddItem("DotNet 时代", "欢迎访问DotNet 时代", "$PHP_SELF?key=page&id=DotNet 时代");
$this->menuAddItem("Visual Basic", "欢迎访问Visual Basic", "$PHP_SELF?key=page&id=Visual Basic");
$this->menuAddItem("Delphi", "欢迎访问Delphi", "$PHP_SELF?key=page&id=Delphi");
$this->menuEndSection();

$this->menuStartSection(3, "开心一刻");
$this->menuAddItem("传统笑话", "传统笑话", "$PHP_SELF?key=page&id=传统笑话");
$this->menuAddItem("近代笑话", "近代笑话", "$PHP_SELF?key=page&id=近代笑话");
$this->menuAddSubSection("儿童类");
$this->menuAddItem("校园笑话", "校园笑话", "$PHP_SELF?key=page&id=校园笑话");
$this->menuAddItem("幼儿笑话", "幼儿笑话", "$PHP_SELF?key=page&id=幼儿笑话");
$this->menuAddItem("少年笑话", "少年笑话", "$PHP_SELF?key=page&id=少年笑话");
$this->menuAddSubSectionLine();
$this->menuAddItem("中学时代笑话", "中学时代笑话", "$PHP_SELF?key=page&id=中学时代笑话");
$this->menuAddSubSection("成人笑话");
$this->menuAddItem("带颜色的笑话", "带颜色的笑话", "$PHP_SELF?key=page&id=带颜色的笑话");
$this->menuAddItem("笑话林", "笑话林", "$PHP_SELF?key=page&id=笑话林");
$this->menuEndSection();

$this->menuSectionAsItem(3, "菜单简介", "菜单简介", "$PHP_SELF?key=about");

$this->menuStartSection(1, "个人收藏夹");
$this->menuAddItem("DotNet 时代", "欢迎访问DotNet 时代", "$PHP_SELF?key=page&id=DotNet 时代");
$this->menuEndSection();

// 将个人收藏夹定为启动菜单
$this->menuOn = 4;
$this->scriptOut();
echo "n";
}
}

class Application {
var $frame;
var $menu;
var $page;
var $about;
function Application() {
$this->frame = new Frame;
$this->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->run($id);
break;
case "about":
$this->about->run();
break;
default:
$this->frame->run();
}
}
}
?>
/** 运行 **/
$app = new Application;
$app->run($key,$id);
?>



Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1666
14
PHP Tutorial
1273
29
C# Tutorial
1252
24
What are the differences between Huawei GT3 Pro and GT4? What are the differences between Huawei GT3 Pro and GT4? Dec 29, 2023 pm 02:27 PM

Many users will choose the Huawei brand when choosing smart watches. Among them, Huawei GT3pro and GT4 are very popular choices. Many users are curious about the difference between Huawei GT3pro and GT4. Let’s introduce the two to you. . What are the differences between Huawei GT3pro and GT4? 1. Appearance GT4: 46mm and 41mm, the material is glass mirror + stainless steel body + high-resolution fiber back shell. GT3pro: 46.6mm and 42.9mm, the material is sapphire glass + titanium body/ceramic body + ceramic back shell 2. Healthy GT4: Using the latest Huawei Truseen5.5+ algorithm, the results will be more accurate. GT3pro: Added ECG electrocardiogram and blood vessel and safety

How to modify element.style How to modify element.style Nov 24, 2023 am 11:15 AM

Methods for element.style to modify elements: 1. Modify the background color of the element; 2. Modify the font size of the element; 3. Modify the border style of the element; 4. Modify the font style of the element; 5. Modify the horizontal alignment of the element. Detailed introduction: 1. Modify the background color of the element, the syntax is "document.getElementById("myElement").style.backgroundColor = "red";"; 2. Modify the font size of the element, etc.

Fix: Snipping tool not working in Windows 11 Fix: Snipping tool not working in Windows 11 Aug 24, 2023 am 09:48 AM

Why Snipping Tool Not Working on Windows 11 Understanding the root cause of the problem can help find the right solution. Here are the top reasons why the Snipping Tool might not be working properly: Focus Assistant is On: This prevents the Snipping Tool from opening. Corrupted application: If the snipping tool crashes on launch, it might be corrupted. Outdated graphics drivers: Incompatible drivers may interfere with the snipping tool. Interference from other applications: Other running applications may conflict with the Snipping Tool. Certificate has expired: An error during the upgrade process may cause this issu simple solution. These are suitable for most users and do not require any special technical knowledge. 1. Update Windows and Microsoft Store apps

How to dynamically modify style in react How to dynamically modify style in react Dec 28, 2022 am 10:44 AM

Methods for react to dynamically modify style: 1. Add ref to the element whose style needs to be modified, with syntax such as "<div className='scroll-title clear-fix' ref={ this.manage }>"; 2. Through dynamic control The change of state modifies the style of the element; 3. By using JS code in the DOM, the display and hiding transitions of different DOMs are realized.

What are the new features in Vue3 style and how to use them What are the new features in Vue3 style and how to use them May 14, 2023 pm 10:52 PM

New features of style Vue3.2 version has made many upgrades to the style of single-file components, such as local styles, css variables, and styles exposed to templates. (Learning video sharing: Vue video tutorial) 1. Local style When the label has scoped attribute, its CSS will only be applied to the elements of the current component: hi.example{color:red;} 2. The depth selector is scoped If the selector in the style wants to make a more "deep" selection, that is, affect sub-components, you can use the :deep() pseudo-class: .a:deep(.b){/*...*/ }DOM content created through v-html will not be

Vue error: Unable to use v-bind to bind class and style correctly, how to solve it? Vue error: Unable to use v-bind to bind class and style correctly, how to solve it? Aug 26, 2023 pm 10:58 PM

Vue error: Unable to use v-bind to bind class and style correctly, how to solve it? In Vue development, we often use the v-bind instruction to dynamically bind class and style, but sometimes we may encounter some problems, such as being unable to correctly use v-bind to bind class and style. In this article, I will explain the cause of this problem and provide you with a solution. First, let’s understand the v-bind directive. v-bind is used to bind V

How to Fix Can't Connect to App Store Error on iPhone How to Fix Can't Connect to App Store Error on iPhone Jul 29, 2023 am 08:22 AM

Part 1: Initial Troubleshooting Steps Checking Apple’s System Status: Before delving into complex solutions, let’s start with the basics. The problem may not lie with your device; Apple's servers may be down. Visit Apple's System Status page to see if the AppStore is working properly. If there's a problem, all you can do is wait for Apple to fix it. Check your internet connection: Make sure you have a stable internet connection as the "Unable to connect to AppStore" issue can sometimes be attributed to a poor connection. Try switching between Wi-Fi and mobile data or resetting network settings (General > Reset > Reset Network Settings > Settings). Update your iOS version:

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

See all articles