📄 menu_item.php
字号:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>BODY {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px; scrollbar-face-color: ffffff; scrollbar-shadow-color: C1C1BB; scrollbar-highlight-color: C1C1BB; scrollbar-3dlight-color: EBEBE4; scrollbar-darkshadow-color: EBEBE4; scrollbar-track-color: F4F4F0; scrollbar-arrow-color: CACAB7
}
P {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px
}
INPUT {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px
}
FONT {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px
}
SELECT {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px
}
OPTION {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px
}
TEXTAREA {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px
}
FORM {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px
}
TD {
FONT-FAMILY: "宋体"; FONT-SIZE: 12px; TABLE-LAYOUT: fixed; WORD-BREAK: break-all
}
A:link {
TEXT-DECORATION: none
}
A:visited {
TEXT-DECORATION: none
}
A:hover {
TEXT-DECORATION: underline
}
A:active {
FONT-SIZE: 12px; TEXT-DECORATION: none
}
.border {
BACKGROUND-COLOR: #efefef; BORDER-BOTTOM: 1px dotted; BORDER-COLLAPSE: collapse; BORDER-LEFT: 1px dotted; BORDER-RIGHT: 1px dotted; BORDER-TOP: 1px dotted; COLOR: #000000
}
.shadow1 {
COLOR: #ffffff; FILTER: dropshadow(color=#000000,offx=1,offy=1); FONT-SIZE: 12px
}
.shadow2 {
COLOR: #000000; FILTER: dropshadow(color=#d5d5d5,offx=1,offy=1); FONT-SIZE: 12px
}
.p1 {
COLOR: #ffffff; FONT-SIZE: 12px; TEXT-DECORATION: none
}
.p2 {
COLOR: #000000; FONT-SIZE: 12px; TEXT-DECORATION: none
}
.p3 {
COLOR: #004080; FONT-SIZE: 14px; TEXT-DECORATION: none
}
</STYLE>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<table width="400" border="1" class=border cellpadding="3" cellspacing="0" bordercolor="#111111" height="350">
<tr>
<td width="400" valign="top"> <br><br>
<?
function my_menu($menu_content,$i,$menu_grade_temp,$menu_superior_temp)
{
//定义全局变量
global $PHP_SELF; //函数调用本身
global $G_menu_array; //各级目录以/分开形成的数组
global $G_menu_id; //目录的级别号
global $tem1; //父级目录的节点号
global $tem2; //按目录级别分别存储各个数组的值
$temp1=$menu_grade_temp+1;
$menu_superior_temp_array=split("/",$menu_superior_temp);
//echo "<table border=0 ><tr><td></td><td>"; //显示位置的调整
//echo "<table border=\"0\" cols=8 width=\"132\" >";//原始的状态
//echo "<tr><td ></td><td align=left>";
for ($t=0;$t<=$i;$t++)
{
$menu_array=split("/",$menu_content[$t]);
If(($menu_array[2]==$menu_grade_temp)&&($menu_array[3]==$menu_superior_temp_array[$menu_grade_temp-1]))
{
for($p=2;$p<=$menu_grade_temp;$p++)
{
if($p<$menu_grade_temp)
{
echo "<img src=\"./images/tree_vertline.gif\" width=\"20\" height=\"16\" Align=\"baseline\">";
continue;
}
else
{
//echo "<img src=\"./images/tree_split.gif\" width=\"20\" height=\"16\" Align=\"baseline\">";
echo "<img src=\"./images/TREE_END.GIF\" width=\"20\" height=\"16\" Align=\"baseline\">";
}
}
$temp3=$menu_superior_temp_array;
$temp3[$menu_grade_temp]=$menu_array[0];
$temp2=implode("/",$temp3);
if ($menu_array[0]==$menu_superior_temp_array[$temp1-1])
{
$temp5=$temp1-1;
$temp3[$menu_grade_temp]="";
$temp6=implode("/",$temp3);
$G_menu_id=$menu_array[0];
$G_menu_array=$menu_array[1];
//第一级不显示连接线
if($menu_grade_temp>1 and $menu_grade_temp<>$temp5)
{
echo "<img src=\"./images/tree_end.gif\" width=\"16\" height=\"16\" align=\"absolute middle\">";
}
echo "<font size=\"2\"><a href=\"$PHP_SELF?menu_grade_temp=".$temp5."&menu_superior_temp=$temp6\" ><img src=\"./images/tree_collapse.gif\" width=\"16\" height=\"16\" border=\"0\" align=\"absolute middle\"></a>";
$tn=$menu_array[0];
echo "<font size=\"2\"><a href=\"item_edit.php?sid=$menu_array[0]&pid=$menu_array[3]\" target=\"mainFrameson\">$menu_array[1]</a><br>";
$tem1=$temp1-1;
$tem2=$temp2;
my_menu($menu_content,$i,$temp1,$temp2);
}
else
{
$temp3[$menu_grade_temp+1]="";
$temp6=implode("/",$temp3);
echo "<font size=\"2\"><a href=\"$PHP_SELF?menu_grade_temp=".$temp1."&menu_superior_temp=$temp6\"><img src=\"./images/tree_expand.gif\" width=\"16\" height=\"16\" border=\"0\" align=\"absolute middle\"></a>";
echo "<font size=\"2\"><a href=\"item_edit.php?sid=$menu_array[0]&pid=$menu_array[3]\" target=\"mainFrameson\">$menu_array[1]</a><br>";
}
} //if判断的结束
}//for循环结束
}//function结束
?>
<?
require "inc/func.php";
//从数据库中取得数据
$query_string="select class_id,class_name,class_layer,class_father from baseclass order by class_layer,tabindex";
//$db_data=mysql_query($query_string);
$db_data=$cla->db_query($query_string);
if ($menu_grade_temp=="")
{
$menu_superior_temp=0;
}
$i=0;
while (list($menu_id,$menu,$menu_grade,$menu_superior)=$db_data[$i])
{
$menu_id=strip_tags($menu_id);
$menu=strip_tags($menu);
$menu_grade=strip_tags($menu_grade);
$menu_superior=strip_tags($menu_superior);
$menu_content[$i]=$menu_id."/".$menu."/".$menu_grade."/".$menu_superior;
$i++;
}
my_menu($menu_content,$i,1,$menu_superior_temp);
?>
</td>
</tr>
</table>
<?$cla->db_logoff();?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -