<?
include "school/inc/config.php";
include "school/inc/config_ms.php";
session_start();
function showmenu($f_block_dm)
{
$x_fid=$f_block_dm;
global $group_dm,$ksh,$user_name;
global $dbusername,$dbpassword,$database,$host;
$mycon=new DB_Sql();
$mycon->connect($database,$host,$dbusername,$dbpassword);
$query="select * from block where f_block_dm='$x_fid' order by place";
$mycon->query($query);
while($mycon->next_record())
{
$xid=$mycon->f(block_dm);
$block_name=$mycon->f(block_name);
$url=$mycon->f(url);
$qx=qx($user_name,$xid);
// $url="/frame.php?qx=$qx&left_url=".$url;
$url_s=$url;
$url=$url."?block_dm=".$xid;
$menu_name="a".$xid;
$mscon=new DB_Sql();
$mscon->connect($database,$host,$dbusername,$dbpassword);
$query="select * from block where f_block_dm='$xid'";
$mscon->query($query);
$mscon->next_record();
$row=$mscon->nf();
// echo $row;
if($qx>1)
{
if($row!=0)
{
if($x_fid=="a")
{
echo "menu.addItem('".$block_name."','".$url."');";
echo "var ".$menu_name." = null;";
echo $menu_name." = new MTMenu();";
}
else
{
$f_menu_name="a".$x_fid;
echo $f_menu_name.".addItem('".$block_name."','".$url."');";
echo "var ".$menu_name." = null;";
echo $menu_name." = new MTMenu();";
}
showmenu($xid);
if ($x_fid=="a")
echo "menu.makeLastSubmenu(".$menu_name.");";
else
{
$f_menu_name="a".$x_fid;
echo $f_menu_name.".makeLastSubmenu(".$menu_name.");";
}
}
else
{
if ($x_fid=="a")
{
echo "menu.addItem('".$block_name."','".$url."');";
}
else
{
$f_menu_name="a".$x_fid;
echo $f_menu_name.".addItem('".$block_name."','".$url."');";
}
}
}
}
}
?><html>
<head>
<title></title>
<script type="text/javascript">
var relocateURL = "/";
if(parent.frames.length == 0) {
if(document.images) {
location.replace(relocateURL);
} else {
location = relocateURL;
}
}
</script>
<script type="text/javascript" src="mtmcode.js">
</script>
<script type="text/javascript">
MTMDefaultTarget = "text";
var MTMIconList = null;MTMIconList = new IconList();MTMIconList.addIcon(new MTMIcon("menu_link_external.gif", "http://", "pre"));
MTMIconList.addIcon(new MTMIcon("menu_link_pdf.gif", ".pdf", "post"));var menu = null;
menu = new MTMenu();
<?
showmenu("a");
?>
</script>
<link href="sys_images/model_1/index.css" rel="stylesheet" type="text/css">
</head>
<body onload="MTMStartMenu(true)" bgcolor="#F5F8FF" text="#ffffcc" link="yellow" vlink="lime" alink="red">
</body>
</html>
有一部分用的是php,不知道你能看懂不~~~~~~~~~~~~~~~~~~~
include "school/inc/config.php";
include "school/inc/config_ms.php";
session_start();
function showmenu($f_block_dm)
{
$x_fid=$f_block_dm;
global $group_dm,$ksh,$user_name;
global $dbusername,$dbpassword,$database,$host;
$mycon=new DB_Sql();
$mycon->connect($database,$host,$dbusername,$dbpassword);
$query="select * from block where f_block_dm='$x_fid' order by place";
$mycon->query($query);
while($mycon->next_record())
{
$xid=$mycon->f(block_dm);
$block_name=$mycon->f(block_name);
$url=$mycon->f(url);
$qx=qx($user_name,$xid);
// $url="/frame.php?qx=$qx&left_url=".$url;
$url_s=$url;
$url=$url."?block_dm=".$xid;
$menu_name="a".$xid;
$mscon=new DB_Sql();
$mscon->connect($database,$host,$dbusername,$dbpassword);
$query="select * from block where f_block_dm='$xid'";
$mscon->query($query);
$mscon->next_record();
$row=$mscon->nf();
// echo $row;
if($qx>1)
{
if($row!=0)
{
if($x_fid=="a")
{
echo "menu.addItem('".$block_name."','".$url."');";
echo "var ".$menu_name." = null;";
echo $menu_name." = new MTMenu();";
}
else
{
$f_menu_name="a".$x_fid;
echo $f_menu_name.".addItem('".$block_name."','".$url."');";
echo "var ".$menu_name." = null;";
echo $menu_name." = new MTMenu();";
}
showmenu($xid);
if ($x_fid=="a")
echo "menu.makeLastSubmenu(".$menu_name.");";
else
{
$f_menu_name="a".$x_fid;
echo $f_menu_name.".makeLastSubmenu(".$menu_name.");";
}
}
else
{
if ($x_fid=="a")
{
echo "menu.addItem('".$block_name."','".$url."');";
}
else
{
$f_menu_name="a".$x_fid;
echo $f_menu_name.".addItem('".$block_name."','".$url."');";
}
}
}
}
}
?><html>
<head>
<title></title>
<script type="text/javascript">
var relocateURL = "/";
if(parent.frames.length == 0) {
if(document.images) {
location.replace(relocateURL);
} else {
location = relocateURL;
}
}
</script>
<script type="text/javascript" src="mtmcode.js">
</script>
<script type="text/javascript">
MTMDefaultTarget = "text";
var MTMIconList = null;MTMIconList = new IconList();MTMIconList.addIcon(new MTMIcon("menu_link_external.gif", "http://", "pre"));
MTMIconList.addIcon(new MTMIcon("menu_link_pdf.gif", ".pdf", "post"));var menu = null;
menu = new MTMenu();
<?
showmenu("a");
?>
</script>
<link href="sys_images/model_1/index.css" rel="stylesheet" type="text/css">
</head>
<body onload="MTMStartMenu(true)" bgcolor="#F5F8FF" text="#ffffcc" link="yellow" vlink="lime" alink="red">
</body>
</html>
有一部分用的是php,不知道你能看懂不~~~~~~~~~~~~~~~~~~~
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货