//error_reporting(E_ALL);
//exit();
/**
* Site Index File
*
* 声明:
* 本站是一个开放源代码的网站
*
* @author yunest <http://yunest.iteye.com>
* @version 1.0 2009-05-13 8:49 $
*/
// Include the common file:
include_once ('common.inc.php');
// Validate what page to show:
$p=isset($_GET['p'])?$_GET['p']:null;
//Check if the request is in the list.
if(!in_array($p,array('about','this','that','contact'))){
$page = 'main.inc.php';
}
// Determine what page to display:
switch ($p) {
case 'about':
$page = 'about.inc.php';
$page_title = $link_arr['about'];
break;
case 'this':
$page = 'this.inc.php';
$page_title = $link_arr['this'];
break;
case 'that':
$page = 'that.inc.php';
$page_title = $link_arr['that'];
break;
case 'contact':
$page = 'contact.inc.php';
$page_title = $link_arr['contact'];
break;
case 'search':
$page = 'search.inc.php';
$page_title = $link_arr['search'];
break;
// Default is to include the main page.
default:
$page = 'main.inc.php';
$page_title = $link_arr['index'];
break;
} // End of main switch.
// Make sure the file exists:
if (!file_exists($page)) {
$page = 'main.inc.php';
$page_title = $link_arr['index'];
}
// Include the header file:
include_once ('header.php');
// Include the content-specific module:
// $page is determined from the above switch.
include ($page);
分享到:
相关推荐
3.3 用switch实现选择结构(ppt)
用switch实现的简单四则运算功能。 适合c#初学者参考
C++分别用 ifelse 与switch 实现算税收
有关状态机设计方面的书籍,我这里隆重推荐一本:《Practical Statecharts in C/C++ Quantum Programming for Embedded Systems》,中文名叫做《嵌入式系统的微模块化程序设计-实用状态图C/C++实现》,北航出版的,...
智能无限Belkin WeMo Switch模块化智能家居遥控器.pdf
Android使用ViewFlipper实现Switch。开关部分通过自定义控件继承ViewFlipper来实现,开关动画通过anim文件来实现。
用开源项目实现自定义switch,
switch实现计算器 完整代码数据
arduino 315m433 无线模块库 433M无线模块的rc-switch库
switchcase-用纯 Python 实现的 Switch-Case 结构
SWITCH语句在MATLAB中的应用,条件一成立,执行条件一,条件二成立执行条件二语句,否则跳出循环。
使用switch语句构成的分支结构实现选择主菜单中的选项; 只供参考
Android使用ViewPager实现Switch动画特效。
用switch语句编写的小程序,判断每个月有多少天。
这篇文章就是来探索这个问题,并且最终实现一个 Switch 组件 先来看看我们希望用户是如何使用 Switch 的 用 js 的方式来对比一下: 用户可以通过一个 VSwitch 组件来应用 switch 功能 通过 case 来确定匹配的...
基于QT的switch开关,采用QML的方式实现的
利用全局变量和函数实现模块化程序设计; 3. 结合具体的编程环境,掌握多文件编程的方法,为编制实用程序打下基础。 二、实验要求 1. 复习函数定义和调用方法; 2. 复习 switch 语句的实现菜单程序用法; 3. 综合...
Switch>enable Switch#configure terminal Switch(config)#vlan 10 Switch(config-vlan)#name test Switch(config-vlan)#interface f0/5 Switch(config-if)#switchport access vlan 10 Switch(config-if)#end Switch...