<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>The page Cannot dot info</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<script>
function toggle(id,p){
var myChild = document.getElementById(id);
if(myChild.style.display!='block'){
myChild.style.display='block';
document.getElementById(p).className='folderOpen';
}else{
myChild.style.display='none';document.getElementById(p).className='folder';
}}
</script>
<style>
ul.tree {
display:none;margin-left:10px;
}
li.folder {
list-style-image: url(plus1.gif);
}
li.folderOpen {
list-style-image: url(minus1.gif);
}
li.file {
list-style-image: url(dot1.gif);
}
a.treeview {
font-family:tahoma;
font-size:11px;
}
a.treeview:link {
text-decoration:none;
color: #000000;
}
a.treeview:visited {
text-decoration:none;
color: #000000;
}
a.treeview:hover {
text-decoration:none;
color: #FF0000;
}
</style>
</head>
<body>
<?php
$h = "localhost";
$un="root";
$pwd="123";
@$myconn = mysql_connect($h,$un,$pwd);
if($myconn) {
$sql = "select * from TblTestTree";
$result = mysql_db_query("TestTreeDB",$sql,$myconn);
$totalrow = mysql_num_rows($result);
if($totalrow > 0 ) {
for($i = 0; $i < $totalrow-1;$i++) {
?>
<ul xstyle='margin-left:20px;' id='N0'>
<li class="folder" id="P00">
<a class="treeview" href="javascript:toggle('N0_0','P00')"><strong>
<?php echo mysql_result($result,$i,"Treename");?>
</strong></a>
<ul class=tree id="N0_0">
<li style='list-style-image: url(dot1.gif);' class="file"><a class="treeview" href="<?php echo mysql_result($result,$i,"Links");?>" target="_self" title=""><?php echo "URL1 :" . mysql_result($result,$i,"Links");?></a></li>
<li style='list-style-image: url(dot1.gif);' class="file"><a class="treeview" href="#" target="_self" title="">
<?php echo "URL2 :" . mysql_result($result,$i,"Links");?>
</a></li>
</ul>
</li>
</ul>
<?php }
} else { echo "not found data "; }
}
?>
</body>
</html>
|