📄 menu_top.php
字号:
<?php
include_once( "inc/auth.php" );
$MENU_TOP = array(
array(
"text" => "基本信息",
"href" => "base?PROJ_ID=".$PROJ_ID."&EDIT_FLAG={$EDIT_FLAG}",
"target" => "",
"title" => "",
"img" => "/images/menu/project.gif"
),
array(
"text" => "项目成员",
"href" => "user?PROJ_ID=".$PROJ_ID."&EDIT_FLAG={$EDIT_FLAG}",
"target" => "",
"title" => "",
"img" => "/images/user_group.gif"
),
array(
"text" => "项目任务",
"href" => "task?PROJ_ID=".$PROJ_ID."&EDIT_FLAG={$EDIT_FLAG}",
"target" => "",
"title" => "",
"img" => "/images/menu/diary.gif"
),
array(
"text" => "项目文档",
"href" => "file?PROJ_ID=".$PROJ_ID."&EDIT_FLAG={$EDIT_FLAG}",
"target" => "",
"title" => "",
"img" => "/images/menu/file_folder.gif"
),
array(
"text" => "项目预算",
"href" => "cost?PROJ_ID=".$PROJ_ID."&EDIT_FLAG={$EDIT_FLAG}",
"target" => "",
"title" => "",
"img" => "/images/project/cost.gif"
)
);
$SCRIPT = "\r\n<script>\r\nvar \$ = function(id) {return document.getElementById(id);};\r\nvar userAgent = navigator.userAgent.toLowerCase();\r\nvar isSafari = userAgent.indexOf(\"Safari\")>=0;\r\nvar is_opera = userAgent.indexOf(\"opera\") != -1 && opera.version();\r\nvar is_moz = (navigator.product == \"Gecko\") && userAgent.substr(userAgent.indexOf(\"firefox\") + 8, 3);\r\nvar is_ie = (userAgent.indexOf(\"msie\") != -1 && !is_opera) && userAgent.substr(userAgent.indexOf(\"msie\") + 5, 3);;\r\nif(is_ie)\r\n window.attachEvent(\"onload\", forbiden);\r\nelse\r\n window.addEventListener(\"load\", forbiden,false);\r\n";
if ( !$PROJ_ID )
{
$SCRIPT .= "\r\n function forbiden()\r\n {\r\n var menu=document.getElementById(\"navMenu\");\r\n var menu_id=0;\r\n if(!menu) return; \r\n for(var i=0; i<menu.childNodes.length;i++)\r\n {\r\n if(menu.childNodes[i].tagName!=\"A\")\r\n continue;\r\n if(menu_id!=0)\r\n {\r\n menu.childNodes[i].href=\"#\";\r\n menu.childNodes[i].target=\"_self\"; \r\n menu.childNodes[i].onclick=function(){alert(\"请先保存项目信息!\");};\r\n }\r\n menu_id++;\r\n }\r\n }\r\n ";
}
else
{
$SCRIPT .= "function forbiden(){return;}";
}
$SCRIPT .= "</script>";
include_once( "inc/menu_top.php" );
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -