init web ems all

This commit is contained in:
agtuser
2024-09-27 17:13:36 +08:00
parent 81c97acbe9
commit 5cc56f8078
4263 changed files with 798779 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
<?php
/*********************************************************
<20>ļ<EFBFBD>˵<EFBFBD><CBB5>:
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:OMC<4D><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>
<20><><EFBFBD>ù<EFBFBD>ϵ:<3A><><EFBFBD><EFBFBD>:header.inc
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3>
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:
$OmcTypeNo <09><>config.inc<6E>ж<EFBFBD><D0B6><EFBFBD>;
$myPrivilege <09><><EFBFBD>û<EFBFBD><C3BB><EFBFBD>session<6F><6E>ȡ<EFBFBD><C8A1>
<20><><EFBFBD><EFBFBD>:
<EFBFBD>޸<EFBFBD>ע<EFBFBD><EFBFBD>:
NO.1
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
ʱ<EFBFBD><EFBFBD>:
<EFBFBD>޸<EFBFBD>˵<EFBFBD><EFBFBD>:
*********************************************************/
require("../../inc/header.inc");
$DEBUG=0;
$pubDb = 'OMC_PUB';
$OmcTypeNo = (isset($thisOmcType)?$thisOmcType:0);
$level_1 = $_REQUEST['level_1'];
$level_1 = ($level_1 > 0 ?$level_1 :1);
//$myPrivilege = $user_info["permission"];
$myPrivilege = 9;
$max_layer=5;
if($selectedLanguage == 'eng'){
$menuName = "name_2";
$menuRemark = "remark_2";
}else{
$menuName = "name_1";
$menuRemark = "remark_1";
}
//menuTypeNo level_1 level_2 level_3 level_4 level_5 name_1 name_2 link_1 link_2 privilege remark_1 remark_2
$menuSql = "SELECT $menuName,httpLink,$menuRemark
FROM sysMenuConf
WHERE menuTypeNo = '$OmcTypeNo' AND privilege <= '$myPrivilege' AND privilege >= '0'
AND level_1='$level_1'
ORDER BY level_1,level_2,level_3,level_4,level_5
LIMIT 0,1
";
if($DEBUG) echo "<br>menuSql = $menuSql";
$menuResult = mysqli_query($pubConn,$menuSql);
echo mysqli_error($pubConn);
$menuRowsNum = mysqli_num_rows($menuResult);
$menuRow=mysqli_fetch_array($menuResult);
if($DEBUG) echo "<br>menuName=$menuRow[$menuName]";
if($DEBUG) echo "<br>httpLink=$menuRow[httpLink]";
if($DEBUG) echo "<br>menuRemark=$menuRow[$menuRemark]";
$httpLink=$menuRow['httpLink'];
if($DEBUG) exit();
if(strlen($httpLink) > 5){
echo " <meta http-equiv=\"refresh\" content=\"0; url=$httpLink\"> ";
}else{
echo "Error httpLink";
}
?>
</html>

View File

@@ -0,0 +1,17 @@
<?php
require("../../inc/header.inc");
?>
<frameset cols="150,*" framespacing="0" border="0" frameborder="0">
<frame noresize="noresize" name="leftMenu" target="contents" src="../leftMenu/leftMenu.php?level_1=<?php echo $_REQUEST['level_1'];?>" scrolling="auto" style="border-right: 0 solid #000000;">
<frame noresize="noresize" name="contents" src="../contents/default.php?level_1=<?php echo $_REQUEST['level_1'];?>">
<noframes>
<body>
<p><3E><><EFBFBD><EFBFBD>ҳʹ<D2B3><CAB9><EFBFBD>˿<EFBFBD><CBBF>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD>ֿ<EFBFBD><D6BF>ܡ<EFBFBD></p>
</body>
</noframes>
</frameset>
</html>

View File

@@ -0,0 +1,23 @@
<html>
<head>
<title>Checkbox Tree in JavaScript</title>
<script>
function op() { //This function is used with folders that do not open pages themselves. See online docs.
}
</script>
</head>
<!--
(Please keep all copyright notices.)
This frameset document includes the Treeview script.
Script found in: http://www.treeview.net
Author: Marcelino Alves Martins
-->
<FRAMESET cols="200,*">
<FRAME src="demoCheckboxLeftFrame.html" name="treeframe" >
<FRAME SRC="demoCheckboxRightFrame.html" name="basefrm">
</FRAMESET>
</HTML>

View File

@@ -0,0 +1,77 @@
<!--
(Please keep all copyright notices.)
This frameset document includes the Treeview script.
Script found at: http://www.treeview.net
Author: Marcelino Alves Martins
See demoFramesetLeftFrame.html for instructions specific to the left frame
-->
<html>
<head>
<style>
BODY {background-color: white}
TD {font-size: 10pt;
font-family: verdana,helvetica;
text-decoration: none;
white-space:nowrap;}
A {text-decoration: none;
color: black}
</style>
<script src="ua.js"></script>
<script src="ftiens4.js"></script>
<script src="demoCheckboxNodes.js"></script>
<script>
// This function depends on the actual prependHTML strings used in the
// configuration file (dmeoChackboxNodes.js). If you change that, you will
// have to change this
function generateQueryString() {
var retStr
//getElById is defined in ftiens4.js and help with cross-browser compatibility
retStr = "BOX1=" + getElById('BOX1').checked
retStr = retStr + "&BOX2=" + getElById('BOX2').checked
retStr = retStr + "&BOX3=" + getElById('BOX3').checked
retStr = retStr + "&RD1=" + getElById('RD1').checked
retStr = retStr + "&RD2=" + getElById('RD2').checked
retStr = retStr + "&RD3=" + getElById('RD3').checked
return retStr;
}
// If you are not using a frameset layout, this function will have to
// change from reloading the right frame to reloading the self window
function submitTreeForm() {
window.open("demoCheckboxRightFrame.html?" + generateQueryString(), "basefrm")
}
</script>
<title>Checkbox Tree JavasScript</title>
</head>
<body topmargin=16 marginheight=16>
<!-- Corporate users or any others that want to remove the next link should check
the online FAQ for instructions on how to obtain a version without the link -->
<!-- Removing this link will make the script stop from working -->
<div style="position:absolute; top:0; left:0; "><table border=0><tr><td><font size=-2><a style="font-size:7pt;text-decoration:none;color:silver" href="http://www.treemenu.net/" target=_blank>Javascript Tree Menu</a></font></td></tr></table></div>
<!-- The form-related tags in this file are only needed for to demonstrate checkbox
functionality. If your site will not display checkboxes, picka a different configuration file.
-->
<form name=ft method="">
<!-- Build the browser's objects and display default view of the
tree. -->
<script>initializeDocument()</script>
<noscript>
A tree for site navigation will open here if you enable JavaScript in your browser.
</noscript>
<BR><BR>
<CENTER><input type=button onClick="submitTreeForm()" value="Get Values"></CENTER>
</form>
</html>

View File

@@ -0,0 +1,74 @@
// You can find general instructions for this file here:
// http://www.treeview.net
// Intructions on how to add checkboxes to a tree are only provided in this file.
USETEXTLINKS = 1
STARTALLOPEN = 0
HIGHLIGHT = 0
PERSERVESTATE = 1
USEICONS = 0
// In this case we want the whole tree to be built,
// even those branches that are closed. The reason is that
// otherwise some form elements might not be built at all
// before the user presses "Get Values"
BUILDALL = 1
// This configuration file is used to demontrate how to add checkboxes to your tree.
// If your site will not display checkboxes, picka a different configuration file as
// the example to follow and adapt
// Notes:
// If you are going to set USEICONS = 1, then you will want to edit the gif files and
// remove the white space on the right
// Auxiliary functions for the contruction of the tree
// You will mcertainly want to change these functions for your own purposes
// If you want to add checkboxes to the folder you will have to create a function
// similar to this one to do that and call it below in the tree construction section
// These functions are directly realted with the additional JavaScript in the
// page holding the tree (demoCheckbox.html), where the form handling code
// resides
function generateCheckBox(parentfolderObject, itemLabel, checkBoxDOMId) {
var newObj;
// Read the online documentation for an explanation of insDoc and gLnk,
// they are the base of the simplest Treeview trees
newObj = insDoc(parentfolderObject, gLnk("R", itemLabel, "javascript:parent.op()"))
// The trick to show checkboxes in a tree that was made to display links is to
// use the prependHTML. There are general instructions about this member
// in the online documentation
newObj.prependHTML = "<td valign=middle><input type=checkbox id="+checkBoxDOMId+"></td>"
}
// Function similar to the above, but instead of creating checkboxes, it creates
// radio buttons
function generateRadioB(parentfolderObject, itemLabel, checkBoxDOMId) {
var newObj;
// Read the online documentation for an explanation of insDoc and gLnk,
// they are the base of the simplest Treeview trees
newObj = insDoc(parentfolderObject, gLnk("R", itemLabel, "javascript:parent.op()"))
// The trick to show checkboxes in a tree that was made to display links is to
// use the prependHTML. There are general instructions about this member
// in the online documentation
newObj.prependHTML = "<td valign=middle><input type=radio name=hourPick id="+checkBoxDOMId+"></td>"
}
// Construction of the tree
foldersTree = gFld("Best time to try demos:", "demoCheckboxRightFrame.html")
foldersTree.treeID = "checkboxTree"
aux1 = insFld(foldersTree, gFld("Day of the week", "javascript:parent.op()"))
generateCheckBox(aux1, "Monday", "BOX1")
generateCheckBox(aux1, "Wednesday", "BOX2")
generateCheckBox(aux1, "Friday", "BOX3")
aux2 = insFld(foldersTree, gFld("Hour", "javascript:parent.op()"))
generateRadioB(aux2, "10AM", "RD1")
generateRadioB(aux2, "2PM", "RD2")
generateRadioB(aux2, "6PM", "RD3")

View File

@@ -0,0 +1,75 @@
<html>
<head>
<style>
BODY {background-color: white; font-size: 10pt; font-family: verdana,helvetica}
</style>
<script>
</script>
</head>
<body bgcolor=white>
<h4>Showing checkboxes in a JavaScript tree</h4>
The layout used for this demo is just one of many possible combinations of Treeview settings. If your site requires a different look-and-feel, check some of the things you can change:
<ul>
<li>Use one frameless page
<li>Link the items to pages.
<li>Display folder and document icons.
<li>Activate highlight of last selection.
<li>See the other demos in this site for more.
</ul>
<p>
Make your selection on the left frame and then press the Get Values button at the bottom. The selected options are shown in this frame. Notice that the Hour group in the tree contains radio buttons; only one can be pressed at a time.
<p>
<script>
//This code is used to read the querystring sent by the left frame
var d="";
var queryStr = window.location.search.substr(1);
var i, splitArray;
var BOX1, BOX2, BOX3, RD1, RD2, RD3
queryStr=unescape(queryStr)
queryStr=queryStr.replace("+"," ").replace("+"," ")
if (queryStr.length != 0) {
splitArray = queryStr.split("&")
for (i=0; i<splitArray.length; i++) {
eval(splitArray[i])
}
}
</script>
Days selected:<b>
<script>
if (BOX1)
document.write ("Monday ")
if (BOX2)
document.write ("Wednesday ")
if (BOX3)
document.write ("Friday ")
</script>
</b><br>
Time selected:<b>
<script>
if (RD1)
document.write ("10AM ")
if (RD2)
document.write ("2PM ")
if (RD3)
document.write ("6PM ")
</script>
</b><BR><BR>
Instructions about how to configure a Treeview script to show checkboxes are provided in the source files <I>demoCheckbox*.*</I> available with the free download.
<p>
<span style="font-size:8pt">Note: This demo runs on IE4+, Mozilla 0.9+, and NS6+. The old NS4.* handles all the other Treeview demos, but does not support the dynamic creation of form elements used by this checkbox tree. The new Opera7 also runs correctly all configurations of the regular Treeview but has one problem with the checkbox demo: it cannot query form elements that are not visible (closed branches.) </span><p>
</body>
</html>

View File

@@ -0,0 +1,27 @@
<html>
<head>
<title>Treeview example</title>
<script>
function op() { //This function is used with folders that do not open pages themselves. See online docs.
}
</script>
</head>
<!--
(Please keep all copyright notices.)
This frameset document includes the Treeview script.
Script found in: http://www.treeview.net
Author: Marcelino Alves Martins
You may make other changes, see online instructions,
but do not change the names of the frames (treeframe and basefrm)
-->
<FRAMESET cols="200,*" onResize="if (navigator.family == 'nn4') window.location.reload()">
<FRAME src="demoDynamicLeftFrame.asp" name="treeframe" >
<FRAME SRC="http://www.google.com/search?sourceid=navclient&q=parakeet" name="basefrm">
</FRAMESET>
</HTML>

View File

@@ -0,0 +1,138 @@
<!--
(Please keep all copyright notices.)
This frameset document includes the Treeview script.
Script found at: http://www.treeview.net
Author: Marcelino Alves Martins
Instructions:
- Follow the steps labeled SECTION1, SECTION2, etc. in this file
-->
<html>
<head>
<title>Frameless JavaScript Tree</title>
<!-- SECTION 1 -->
<style>
/* styles for the tree */
SPAN.TreeviewSpanArea A {
font-size: 10pt;
font-family: verdana,helvetica;
text-decoration: none;
color: black
}
SPAN.TreeviewSpanArea A:hover {
color: '#820082';
}
/* rest of the document */
BODY {background-color: white}
TD {
font-size: 10pt;
font-family: verdana,helvetica;
}
</style>
<!-- SECTION 2: Replace everything (HTML, JavaScript, etc.) from here until the beginning
of SECTION 3 with the pieces of the head section that are needed for your site -->
<script>
//This script is not related with the tree itself, just used for my example
function getQueryString(index)
{
var paramExpressions;
var param
var val
paramExpressions = window.location.search.substr(1).split("&");
if (index < paramExpressions.length)
{
param = paramExpressions[index];
if (param.length > 0) {
return eval(unescape(param));
}
}
return ""
}
</script>
<!-- SECTION 3: These four scripts define the tree, do not remove-->
<script src="ua.js"></script>
<script src="ftiens4.js"></script>
<script src="demoFramelessNodes.js"></script>
</head>
<!-- SECTION 4: Change the body tag to fit your site -->
<body bgcolor=white leftmargin=0 topmargin=0 marginheight="0" marginwidth="0" onResize="if (navigator.family == 'nn4') window.location.reload()">
<!-- SECTION 5: Replace all the HTML from here until the beginning of SECTION 6 with the pieces of the head section that are needed for your site -->
<MAP NAME="ButtonsMap">
<AREA SHAPE="rect" ALT="Home" COORDS="297,0,340,23" HREF="http://www.treeview.net/" target=_top>
<AREA SHAPE="rect" ALT="Demo" COORDS="352,0,402,23" HREF="http://www.treeview.net/treemenu/demos.asp" target=_top>
<AREA SHAPE="rect" ALT="Download" COORDS="417,0,487,23" HREF="http://www.treeview.net/treemenu/download.asp">
<AREA SHAPE="rect" ALT="Install" COORDS="507,0,550,23" HREF="http://www.treeview.net/treemenu/instructions.asp" target=_top>
<AREA SHAPE="rect" ALT="Visual Build" COORDS="570,0,650,23" HREF="http://www.treeview.net/treemenu/treeview_builder.asp" target=_top>
<AREA SHAPE="rect" ALT="FAQ" COORDS="670,0,694,23" HREF="http://www.treeview.net/treemenu/faq.asp" target=_top>
<AREA SHAPE="rect" ALT="Contact" COORDS="712,0,767,23" HREF="http://www.treeview.net/treemenu/contact.asp" target=_top>
</MAP>
<table cellpadding=0 cellspacing=0 border=0 width=772><tr><td width=772>
<img src=http://www.treeview.net/treemenu/layout/topbar_menustrip.gif width=772 height=24 USEMAP="#ButtonsMap" border=0></td></tr></table>
<table cellpadding=0 cellspacing=0 border=0 width=772>
<tr>
<td width=178 valign=top>
<table cellpadding=4 cellspacing=0 border=0 width=100%><tr><td bgcolor=#ECECD9>
<img src=http://www.treeview.net/treemenu/layout/t.gif width=170 height=1><br>
<table cellspacing=0 cellpadding=2 border=0 width=100%><tr><td bgcolor=white>
<!-- SECTION 6: Build the tree. -->
<!-- By making any changes to this code you are violating your user agreement.
Corporate users or any others that want to remove the link should check
the online FAQ for instructions on how to obtain a version without the link -->
<!-- Removing this link will make the script stop from working -->
<table border=0><tr><td><font size=-2><a style="font-size:7pt;text-decoration:none;color:silver" href="http://www.treemenu.net/" target=_blank>JavaScript Tree Menu</a></font></td></tr></table>
<span class=TreeviewSpanArea>
<script>initializeDocument()</script>
<noscript>
A tree for site navigation will open here if you enable JavaScript in your browser.
</noscript>
</span>
<!-- SECTION 7: Continuation of the body of the page, after the tree. Replace whole section with
your site's HTML. -->
</td></tr></table></table>
</td>
<td bgcolor=white valign=top>
<table cellpadding=10 cellspacing=0 border=0 width=100%><tr><td>
<script>
//This code is only needed for the demo, not for your site
var picURL
picURL = getQueryString(0)
if (picURL.length > 0)
document.write("<img src=http://www.treeview.net/treemenu/demopics/" + picURL + "><br><br>");
</script>
<h4>Frameless Layout For Treeview</h4>
This is the demo for the frameless configuration of the tree menu. For instructions on this type of layout and others check the <A HREF="http://www.treeview.net/treemenu/instructions.asp">install</A> page.<p>
For simplification of the demo, most links on the tree actually reload the same page (only with different arguments for different pics.) In your site you will probably be linking to different pages, and many of them will also contain the tree. This way the user can jump from page to page clicking the tree.<p>
Note how some of the expandable/collapsible nodes have an hyperlink on their name (the folder itself can load a page) and others don't. The two types were mixed here for demo purposes.
</td></tr></table></td></tr></table>
</body>
</html>

View File

@@ -0,0 +1,138 @@
<!--
(Please keep all copyright notices.)
This frameset document includes the Treeview script.
Script found at: http://www.treeview.net
Author: Marcelino Alves Martins
Instructions:
- Follow the steps labeled SECTION1, SECTION2, etc. in this file
-->
<html>
<head>
<!-- SECTION 1 -->
<style>
/* styles for the tree */
SPAN.TreeviewSpanArea A {
font-size: 10pt;
font-family: verdana,helvetica;
text-decoration: none;
color: black
}
SPAN.TreeviewSpanArea A:hover {
color: '#820082';
}
/* rest of the document */
BODY {background-color: white}
TD {
font-size: 10pt;
font-family: verdana,helvetica;
}
</style>
<!-- SECTION 2: Replace everything (HTML, JavaScript, etc.) from here until the beginning
of SECTION 3 with the pieces of the head section that are needed for your site -->
<script>
//This script is not related with the tree itself, just used for my example
function getQueryString(index)
{
var paramExpressions;
var param
var val
paramExpressions = window.location.search.substr(1).split("&");
if (index < paramExpressions.length)
{
param = paramExpressions[index];
if (param.length > 0) {
return eval(unescape(param));
}
}
return ""
}
</script>
<!-- SECTION 3: These four scripts define the tree, do not remove-->
<script src="ua.js"></script>
<script src="ftiens4.js"></script>
<script src="demoFramelessHiliNodes.js">
</script>
</head>
<!-- SECTION 4: Change the body tag to fit your site -->
<body bgcolor=white leftmargin=0 topmargin=0 marginheight="0" marginwidth="0" onResize="if (navigator.family == 'nn4') window.location.reload()">
<!-- SECTION 5: Replace all the HTML from here until the beginning of SECTION 6 with the pieces of the head section that are needed for your site -->
<MAP NAME="ButtonsMap">
<AREA SHAPE="rect" ALT="Home" COORDS="297,0,340,23" HREF="http://www.treeview.net/" target=_top>
<AREA SHAPE="rect" ALT="Demo" COORDS="352,0,402,23" HREF="http://www.treeview.net/treemenu/demos.asp" target=_top>
<AREA SHAPE="rect" ALT="Download" COORDS="417,0,487,23" HREF="http://www.treeview.net/treemenu/download.asp">
<AREA SHAPE="rect" ALT="Install" COORDS="507,0,550,23" HREF="http://www.treeview.net/treemenu/instructions.asp" target=_top>
<AREA SHAPE="rect" ALT="Visual Build" COORDS="570,0,650,23" HREF="http://www.treeview.net/treemenu/treeview_builder.asp" target=_top>
<AREA SHAPE="rect" ALT="FAQ" COORDS="670,0,694,23" HREF="http://www.treeview.net/treemenu/faq.asp" target=_top>
<AREA SHAPE="rect" ALT="Contact" COORDS="712,0,767,23" HREF="http://www.treeview.net/treemenu/contact.asp" target=_top>
</MAP>
<table cellpadding=0 cellspacing=0 border=0 width=772><tr><td width=772>
<img src=http://www.treeview.net/treemenu/layout/topbar_menustrip.gif width=772 height=24 USEMAP="#ButtonsMap" border=0></td></table>
<table cellpadding=0 cellspacing=0 border=0 width=772>
<tr>
<td width=178 valign=top>
<table cellpadding=4 cellspacing=0 border=0 width=100%><tr><td bgcolor=#ECECD9>
<img src=http://www.treeview.net/treemenu/layout/t.gif width=170 height=1><br>
<table cellspacing=0 cellpadding=2 border=0 width=100%><tr><td bgcolor=white>
<!-- SECTION 6: Build the tree. -->
<!-- By making any changes to this code you are violating your user agreement.
Corporate users or any others that want to remove the link should check
the online FAQ for instructions on how to obtain a version without the link -->
<!-- Removing this link will make the script stop from working -->
<table border=0><tr><td><font size=-2><a style="font-size:7pt;text-decoration:none;color:silver" href=http://www.treemenu.net/ target=_blank>Javascript Tree Menu</a></font></td></table>
<span class=TreeviewSpanArea>
<script>initializeDocument()</script>
<noscript>
A tree for site navigation will open here if you enable JavaScript in your browser.
</noscript>
</span>
<!-- SECTION 7: Continuation of the body of the page, after the tree. Replace whole section with
your site's HTML. -->
</td></tr></table></table>
</td>
<td bgcolor=white valign=top>
<table cellpadding=10 cellspacing=0 border=0 width=100%><tr><td>
<script>
//This code is only needed for the demo, not for your site
var picURL
picURL = getQueryString(0)
if (picURL.length > 0)
document.write("<img src=http://www.treeview.net/treemenu/demopics/" + picURL + "><br><br>");
</script>
<h4>Testing highlight of selected node (and show-all display)</h5>
This demo is based on the <A HREF="demoFrameless.html"><B>Frameless Layout demo</B></A>. Check that demo first for more information on frameless layout configurations.<p>
Two options are being tested here: the selected-node highlight (HIGHLIGHT) and the opening of the tree with all branches expanded (STARTALLOPEN.) These variables can be set on or off independently of each other. They also work just as well with frame-based layouts. They are only being set on together here for the purposes of demonstration.<p>
Note how clicking on nodes that are themselves connected to pages (such as Unites States) highlights the text of the node. Clicking on the +/- sign or on a node that does not load a page (such as Europe) does not highlight it.<p>
Note also that, in the case of this demo, the page loads with all nodes visible. Some webmasters prefer it that way. Not recommended for very large trees.
</td></table></td></table>
</body>
</html>

View File

@@ -0,0 +1,24 @@
// You can find instructions for this file at http://www.treeview.net
//Environment variables are usually set at the top of this file.
USETEXTLINKS = 1
STARTALLOPEN = 1
USEFRAMES = 0
USEICONS = 0
WRAPTEXT = 1
PERSERVESTATE = 1
HIGHLIGHT = 1
foldersTree = gFld("<b>Tree Options</b>", "demoFramelessHili.html")
aux2 = insFld(foldersTree, gFld("United States", "demoFramelessHili.html?pic=%22beenthere_unitedstates%2Egif%22"))
insDoc(aux2, gLnk("S", "Boston", "demoFramelessHili.html?pic=%22beenthere_boston%2Ejpg%22"))
insDoc(aux2, gLnk("S", "Tiny pic of New York City", "demoFramelessHili.html?pic=%22beenthere_newyork%2Ejpg%22"))
insDoc(aux2, gLnk("S", "Washington", "demoFramelessHili.html?pic=%22beenthere_washington%2Ejpg%22"))
aux2 = insFld(foldersTree, gFld("Europe", "javascript:undefined"))
insDoc(aux2, gLnk("S", "London", "demoFramelessHili.html?pic=%22beenthere_london%2Ejpg%22"))
insDoc(aux2, gLnk("S", "Lisbon", "demoFramelessHili.html?pic=%22beenthere_lisbon%2Ejpg%22"))
//Set this string if Treeview and other configuration files may also be loaded in the same session
foldersTree.treeID = "t2"

View File

@@ -0,0 +1,27 @@
// You can find instructions for this file at http://www.treeview.net
//Environment variables are usually set at the top of this file.
USETEXTLINKS = 1
STARTALLOPEN = 0
USEFRAMES = 0
USEICONS = 0
WRAPTEXT = 1
PERSERVESTATE = 1
foldersTree = gFld("<b>Tree Options</b>", "demoFrameless.html")
aux1 = insFld(foldersTree, gFld("Expand for example with pics and flags", "javascript:undefined"))
aux2 = insFld(aux1, gFld("United States", "demoFrameless.html?pic=%22beenthere_unitedstates%2Egif%22"))
insDoc(aux2, gLnk("S", "Boston", "demoFrameless.html?pic=%22beenthere_boston%2Ejpg%22"))
insDoc(aux2, gLnk("S", "Tiny pic of New York City", "demoFrameless.html?pic=%22beenthere_newyork%2Ejpg%22"))
insDoc(aux2, gLnk("S", "Washington", "demoFrameless.html?pic=%22beenthere_washington%2Ejpg%22"))
aux2 = insFld(aux1, gFld("Europe", "demoFrameless.html?pic=%22beenthere_europe%2Egif%22"))
insDoc(aux2, gLnk("S", "London", "demoFrameless.html?pic=%22beenthere_london%2Ejpg%22"))
insDoc(aux2, gLnk("S", "Lisbon", "demoFrameless.html?pic=%22beenthere_lisbon%2Ejpg%22"))
aux1 = insFld(foldersTree, gFld("Types of node", "javascript:undefined"))
aux2 = insFld(aux1, gFld("Expandable with link", "demoFrameless.html?pic=%22beenthere_europe%2Egif%22"))
insDoc(aux2, gLnk("S", "London", "demoFrameless.html?pic=%22beenthere_london%2Ejpg%22"))
aux2 = insFld(aux1, gFld("Expandable without link", "javascript:undefined"))
insDoc(aux2, gLnk("S", "NYC", "demoFrameless.html?pic=%22beenthere_newyork%2Ejpg%22"))
insDoc(aux1, gLnk("B", "Opens in new window", "http://www.treeview.net/treemenu/demopics/beenthere_pisa.jpg"))

View File

@@ -0,0 +1,27 @@
<html>
<head>
<title>Treeview example</title>
<script>
function op() { //This function is used with folders that do not open pages themselves. See online docs.
}
</script>
</head>
<!--
(Please keep all copyright notices.)
This frameset document includes the Treeview script.
Script found in: http://www.treeview.net
Author: Marcelino Alves Martins
You may make other changes, see online instructions,
but do not change the names of the frames (treeframe and basefrm)
-->
<FRAMESET cols="200,*" onResize="if (navigator.family == 'nn4') window.location.reload()">
<FRAME src="demoFramesetLeftFrame.html" name="treeframe" >
<FRAME SRC="demoFramesetRightFrame.html" name="basefrm">
</FRAMESET>
</HTML>

View File

@@ -0,0 +1,64 @@
<html>
<head>
<!-- if you want black backgound, remove this style block -->
<style>
BODY {background-color: white}
TD {font-size: 10pt;
font-family: verdana,helvetica;
text-decoration: none;
white-space:nowrap;}
A {text-decoration: none;
color: black}
.specialClass {font-family:garamond; font-size:12pt;color:green;font-weight:bold;text-decoration:underline}
</style>
<!-- if you want black backgound, remove this line and the one marked XXXX and keep the style block below
<style>
BODY {background-color: black}
TD {font-size: 10pt;
font-family: verdana,helvetica
text-decoration: none;
white-space:nowrap;}
A {text-decoration: none;
color: white}
</style>
XXXX -->
<!-- NO CHANGES PAST THIS LINE -->
<!-- Code for browser detection -->
<script src="ua.js"></script>
<!-- Infrastructure code for the tree -->
<script src="ftiens4.js"></script>
<!-- Execution of the code that actually builds the specific tree.
The variable foldersTree creates its structure with calls to
gFld, insFld, and insDoc -->
<script src="treeMenu.php"></script>
</head>
<body topmargin=16 marginheight=16>
<!-- By making any changes to this code you are violating your user agreement.
Corporate users or any others that want to remove the link should check
the online FAQ for instructions on how to obtain a version without the link -->
<!-- Removing this link will make the script stop from working -->
<div><a href="http://www.treemenu.net/" target=_blank></a></div>
<!-- Build the browser's objects and display default view of the
tree. -->
<script>initializeDocument()</script>
<noscript>
A tree for site navigation will open here if you enable JavaScript in your browser.
</noscript>
</html>

View File

@@ -0,0 +1,60 @@
// You can find instructions for this file here:
// http://www.treeview.net
// Decide if the names are links or just the icons
USETEXTLINKS = 1 //replace 0 with 1 for hyperlinks
// Decide if the tree is to start all open or just showing the root folders
STARTALLOPEN = 0 //replace 0 with 1 to show the whole tree
ICONPATH = '' //change if the gif's folder is a subfolder, for example: 'images/'
foldersTree = gFld("<i>Treeview Demo</i>", "demoFramesetRightFrame.html")
aux1 = insFld(foldersTree, gFld("Photos example", "demoFramesetRightFrame.html"))
aux2 = insFld(aux1, gFld("United States", "http://www.treeview.net/treemenu/demopics/beenthere_america.gif"))
insDoc(aux2, gLnk("R", "Boston", "http://www.treeview.net/treemenu/demopics/beenthere_boston.jpg"))
insDoc(aux2, gLnk("R", "New York", "http://www.treeview.net/treemenu/demopics/beenthere_newyork.jpg"))
insDoc(aux2, gLnk("R", "Washington", "http://www.treeview.net/treemenu/demopics/beenthere_washington.jpg"))
aux2 = insFld(aux1, gFld("Europe", "http://www.treeview.net/treemenu/demopics/beenthere_europe.gif"))
insDoc(aux2, gLnk("R", "Edinburgh", "http://www.treeview.net/treemenu/demopics/beenthere_edinburgh.gif"))
insDoc(aux2, gLnk("R", "London", "http://www.treeview.net/treemenu/demopics/beenthere_london.jpg"))
insDoc(aux2, gLnk("R", "Munich", "http://www.treeview.net/treemenu/demopics/beenthere_munich.jpg"))
insDoc(aux2, gLnk("R", "Athens", "http://www.treeview.net/treemenu/demopics/beenthere_athens.jpg"))
insDoc(aux2, gLnk("R", "Florence", "http://www.treeview.net/treemenu/demopics/beenthere_florence.jpg"))
//The next three links have their http protocol appended by the script
insDoc(aux2, gLnk("Rh", "Pisa", "www.treeview.net/treemenu/demopics/beenthere_pisa.jpg"))
insDoc(aux2, gLnk("Rh", "Rome", "www.treeview.net/treemenu/demopics/beenthere_rome.jpg"))
insDoc(aux2, gLnk("Rh", "Lisboa", "www.treeview.net/treemenu/demopics/beenthere_lisbon.jpg"))
aux3 = insFld(aux2, gFld("United States", "http://www.treeview.net/treemenu/demopics/beenthere_america.gif"))
insDoc(aux3, gLnk("R", "Boston", "http://www.treeview.net/treemenu/demopics/beenthere_boston.jpg"))
insDoc(aux3, gLnk("R", "New York", "http://www.treeview.net/treemenu/demopics/beenthere_newyork.jpg"))
insDoc(aux2, gLnk("Rh", "Lisboa", "www.treeview.net/treemenu/demopics/beenthere_lisbon.jpg"))
aux1 = insFld(foldersTree, gFld("3 Types of folders", "javascript:parent.op()"))
aux2 = insFld(aux1, gFld("Linked", "http://www.treeview.net/treemenu/demopics/beenthere_unitedstates.gif"))
insDoc(aux2, gLnk("R", "New York", "http://www.treeview.net/treemenu/demopics/beenthere_newyork.jpg"))
aux2 = insFld(aux1, gFld("Empty, linked", "http://www.treeview.net/treemenu/demopics/beenthere_europe.gif"))
//NS4 needs the href to be non-empty to process other events such as open folder,
//hence the op function
aux2 = insFld(aux1, gFld("Not linked", "javascript:parent.op()"))
insDoc(aux2, gLnk("R", "New York", "http://www.treeview.net/treemenu/demopics/beenthere_newyork.jpg"))
aux1 = insFld(foldersTree, gFld("Targets", "javascript:parent.op()"))
insDoc(aux1, gLnk("R", "Right frame", "http://www.treeview.net/treemenu/demopics/beenthere_edinburgh.gif"))
insDoc(aux1, gLnk("B", "New window", "http://www.treeview.net/treemenu/demopics/beenthere_london.jpg"))
insDoc(aux1, gLnk("T", "Whole window", "http://www.treeview.net/treemenu/demopics/beenthere_munich.jpg"))
insDoc(aux1, gLnk("S", "This frame", "http://www.treeview.net/treemenu/demopics/beenthere_athens.jpg"))
// The S target is required and the \\\ before the ' for string arguments are required too
// If you define your function in the parent frame, use javascript:parent.myfunc
insDoc(aux1, gLnk("S", "JavaScript link", "javascript:alert(\\\'This JavaScript link simply calls the built-in alert function,\\\\nbut you can define your own function.\\\')"))
aux1 = insFld(foldersTree, gFld("Other icons", "javascript:parent.op()"))
aux1.iconSrc = ICONPATH + "diffFolder.gif"
aux1.iconSrcClosed = ICONPATH + "diffFolder.gif"
docAux = insDoc(aux1, gLnk("B", "D/L Treeview", "http://www.treeview.net/treemenu/download.asp"))
docAux.iconSrc = ICONPATH + "diffDoc.gif"
aux1 = insFld(foldersTree, gFld("<font color=red>F</font><font color=blue>o</font><font color=pink>r</font><font color=green>m</font><font color=red>a</font><font color=blue>t</font><font color=brown>s</font>", "javascript:parent.op()"))
docAux = insDoc(aux1, gLnk("R", "<div class=specialClass>CSS Class</div>", "http://www.treeview.net/treemenu/demopics/beenthere_newyork.jpg"))

View File

@@ -0,0 +1,57 @@
<HTML>
<HEAD>
<style>
BODY {background-color: white; font-size: 10pt; font-family: verdana,helvetica}
</style>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<table border=0 cellpadding=6>
<tr>
<td align=center valign=middle nowrap>
<H2>Treeview</H2>
<B>The JavaScript tree menu</B><br>
<TT>Dynamic HTML (IE, NN, and more)</TT>
</td>
<td align=center valign=middle width=100%>
&nbsp;&nbsp;&nbsp;&nbsp;
</td>
<td align=center valign=middle>
<font size=-1>Awarded:</font><br>
</td>
</table>
<br><br>
There are many possible ways of displaying and using the links in the tree, and they are all configurable by you. The four main folders in this demo try to show the more relevant variations for a frame-based layout <br><br>
<B>Photos Example</B> organizes photos and maps. You can put any other type of document in the tree: html, asp, movies, sounds, etc. You can even fill the outliner with data from a database or list the files and directories of a computer drive.<P>
<B>Types of folders</B> illustrates the two roles the folder plays in the Treeview script: it is used to contain others entries, but it may also be itself a link. Folders with entries inside show the +/- icon, which is used to expand it or collapse it. Clicking on the folder icon also expands its contents. For those "linked" folders, clicking on the folder icon not only expands it but also loads a page. "Europe" and "United States" in the "Photos example" are linked folders that, when clicked, load maps of the continents.<p>
<B>Targets</B> shows the different places where the linked page may be loaded: right frame, blank window, top frame (removes frameset), and the self frame. Additionaly, instead of an http link, you may have a node in the tree that calls a JavaScript function (a <I>javascript:</I> link.)<p>
<B>Other icons</B> is a folder with a customized icon, and so is the document inside. Your tree may use a custom icon uniformly (all folders with same icon, for example) or apply different icons on a node-by-node basis.<p>
<B>Formats</B> exemplifies ways of changing the default format used for the entries' text. The default font, size, etc. in the left frame are specified by CSS for the generic TD and A. For the "Formats" folder, the colors were specified by embedding HTML tags within the Title argument of the <A HREF="http://www.treeview.net/treemenu/instructions.asp#ADVANCEDCONFIG" target=_top>gLnk function</A> itself. For the "CSS Class" link, the the name was enclosed in a &lt;DIV&gt; tag that points to a predefined style sheet class.<p>
<br>
These combinations are just examples of what can be done with Treeview. Check the documentation and see how to set-up the tree for your particular site-navigation needs.
<P><EFBFBD><EFBFBD> <FONT SIZE=-1><A HREF="http://www.treeview.net/treemenu/instructions.asp" target="_top">How
to install the applet in your web site</A></FONT>
<P>
</BODY>
</HTML>

View File

@@ -0,0 +1,42 @@
<html>
<head>
<!--
(Please keep all copyright notices.)
This frameset document includes the Treeview script.
Script found in: http://www.treeview.net
Author: Marcelino Alves Martins
You may make other changes, see online instructions,
but do not change the names of the frames (treeframe, basefrm, etc.)
-->
<title>Treeview example</title>
<script>
function op() { //This function is used with folders that do not open pages themselves. See online docs.
}
//To use these functions in a frameless layout, move the functions to
//the main page and follow the instructions in the demoFuncsNodes.js
function exampleFunction(message)
{
alert("Treeview nodes can call JS functions\n" + message)
}
// If you rename the "windowWithoutToolbar" function, please don't give it a name that
// starts with "op"; it will conflict with some special Treeview code.
function windowWithoutToolbar(urlStr, width, height)
{
window.open(urlStr, '_blank', 'location=no,status=no,scrollbars=no,menubar=no,toolbar=no,directories=no,resizable=no,width=' + width + ',height=' + height)
}
</script>
</head>
<FRAMESET cols="200,*" onResize="if (navigator.family == 'nn4') window.location.reload()">
<FRAMESET rows="*,100">
<FRAME src="demoFuncsLeftFrame.html" name="treeframe">
<FRAME SRC="demoFuncsMenu.html" name="menu" SCROLLING="no" NORESIZE>
</FRAMESET>
<FRAME SRC="demoFuncsRightFrame.html" name="basefrm">
</FRAMESET>
</HTML>

View File

@@ -0,0 +1,49 @@
<!--
(Please keep all copyright notices.)
This frameset document includes the Treeview script.
Script found at: http://www.treeview.net
Author: Marcelino Alves Martins
-->
<html>
<head>
<style>
BODY {background-color: white}
TD {font-size: 10pt;
font-family: verdana,helvetica;
text-decoration: none;
white-space:nowrap;}
A {text-decoration: none;
color: black}
</style>
<!-- Code for browser detection -->
<script src="ua.js"></script>
<!-- Infrastructure code for the tree -->
<script src="ftiens4.js"></script>
<script src="demoFuncsNodes.js"></script>
</head>
<body topmargin=16 marginheight=16>
<!-- By making any changes to this code you are violating your user agreement.
Corporate users or any others that want to remove the link should check
the online FAQ for instructions on how to obtain a version without the link -->
<!-- Removing this link will make the script stop from working -->
<div style="position:absolute; top:0; left:0; "><table border=0><tr><td><font size=-2><a style="font-size:7pt;text-decoration:none;color:silver" href="http://www.treemenu.net/" target=_blank>JavaScript Tree Menu</a></font></td></tr></table></div>
<!-- Build the browser's objects and display default view of the
tree. -->
<script>initializeDocument()</script>
<noscript>
A tree for site navigation will open here if you enable JavaScript in your browser.
</noscript>
</html>

View File

@@ -0,0 +1,102 @@
<HTML>
<HEAD>
<style>
BODY {background-color: white; font-size: 10pt; font-family: verdana,helvetica}
.menuBtn {width:100%}
</style>
<script>
// Functions called by the menu under the tree
// If you are not going to have an extra frame with action buttons, if your links
// are embedded in the documents that load in the right frame, for example,
// you should move these functions to the frameset file (in this case demoFuncs.html)
// If you are using a frameless layout, you will also have to move these functions
// to the appropriate page.
// In both cases: you will have to update the DOM paths used to access the functions
// and used by the functions themselves.
// Open all folders
// May not work with very large trees (browser may time out)
// You may call this on a node other than the root, but it must be a folder
function expandTree(folderObj)
{
var childObj;
var i;
//Open folder
if (!folderObj.isOpen)
parent.treeframe.clickOnNodeObj(folderObj)
//Call this function for all folder children
for (i=0 ; i < folderObj.nChildren; i++) {
childObj = folderObj.children[i]
if (typeof childObj.setState != "undefined") {//is folder
expandTree(childObj)
}
}
}
// Close all folders
function collapseTree()
{
//hide all folders
parent.treeframe.clickOnNodeObj(parent.treeframe.foldersTree)
//restore first level
parent.treeframe.clickOnNodeObj(parent.treeframe.foldersTree)
}
// In order to show a folder, open all the folders that are higher in the hierarchy
// all the way to the root must also be opened.
// (Does not affect selection highlight.)
function openFolderInTree(linkID)
{
var folderObj;
folderObj = parent.treeframe.findObj(linkID);
folderObj.forceOpeningOfAncestorFolders();
if (!folderObj.isOpen)
parent.treeframe.clickOnNodeObj(folderObj);
}
// Load a page as if a node on the tree was clicked (synchronize frames)
// (Highlights selection if highlight is available.)
function loadSynchPage(linkID)
{
var folderObj;
docObj = parent.treeframe.findObj(linkID);
docObj.forceOpeningOfAncestorFolders();
parent.treeframe.clickOnLink(linkID,docObj.link,'basefrm');
//Scroll the tree window to show the selected node
//Other code in these functions needs to be changed to work with
//frameless pages, but this code should, I think, simply be removed
if (typeof parent.treeframe.document.body != "undefined") //scroll doesn work with NS4, for example
parent.treeframe.document.body.scrollTop=docObj.navObj.offsetTop
}
</script>
</HEAD>
<BODY BGCOLOR="#FFFFFF" leftmargin=0 topmargin=0 marginheight="0" marginwidth="0">
<center>
<form>
<input type=button onClick="javascript:expandTree(parent.treeframe.foldersTree)" value="Open All" class=menuBtn>
<!-- The next three functions have an hardcoded value. How do you figure out which value to use?
What is the id of a node?
If you are not using the node.xID capability, open the tree in the browser and move your mouse
over the +/- nodes to the left of the folders. The numbers shown are the ids of the folders.
Increment that number sequentially to get the ids of the "documents" inside that folder.
If you are using the node.xID capability, then simply use the corresponding xID value (it may
be a string).
-->
<input type=button onClick="javascript:collapseTree(1)" value="Close All" class=menuBtn>
<input type=button onClick="javascript:openFolderInTree(1)" value="Open Flags Folder" class=menuBtn>
<input type=button onClick="javascript:loadSynchPage(10)" value="Load Map of Europe" class=menuBtn>
</form>
</center>
</BODY>
</HTML>

View File

@@ -0,0 +1,46 @@
// You can find instructions for this file here:
// http://www.treeview.net
// Decide if the names are links or just the icons
USETEXTLINKS = 1 //replace 0 with 1 for hyperlinks
// Decide if the tree is to start all open or just showing the root folders
STARTALLOPEN = 0 //replace 0 with 1 to show the whole tree
HIGHLIGHT = 1
foldersTree = gFld("<i>Flags and maps</i>", "demoFuncsRightFrame.html")
aux1 = insFld(foldersTree, gFld("Flags", "javascript:parent.op()"))
insDoc(aux1, gLnk("R", "Germany", "http://www.treeview.net/treemenu/demopics/beenthere_germany.gif"))
insDoc(aux1, gLnk("R", "Greece", "http://www.treeview.net/treemenu/demopics/beenthere_greece.gif"))
insDoc(aux1, gLnk("R", "Italy", "http://www.treeview.net/treemenu/demopics/beenthere_italy.gif"))
insDoc(aux1, gLnk("R", "Portugal", "http://www.treeview.net/treemenu/demopics/beenthere_portugal.gif"))
insDoc(aux1, gLnk("R", "United Kingdom", "http://www.treeview.net/treemenu/demopics/beenthere_unitedkingdom.gif"))
insDoc(aux1, gLnk("R", "United States", "http://www.treeview.net/treemenu/demopics/beenthere_unitedstates.gif"))
aux1 = insFld(foldersTree, gFld("Maps", "javascript:parent.op()"))
insDoc(aux1, gLnk("R", "North America", "http://www.treeview.net/treemenu/demopics/beenthere_america.gif"))
insDoc(aux1, gLnk("R", "Europe", "http://www.treeview.net/treemenu/demopics/beenthere_europe.gif"))
// If your tree instead of the regular http links has "javascript:function(arg)"
// links, and the type of the argument is string, special care is needed regarding
// the quotes and double quotes. Please use exactly the same kind of
// quotes or double quotes used in this example (they change from folder to document).
// Use the exact same number of backslashes for escaping the (double)quote
// characters, and pay attention not only to the (double)quotes surrouding the
// strings, but also to any (double)quote characters inside of that string
// If you are going to use a frameless layout, you will need to move the functions
// exampleFunction and windowWithoutToolbar to the main page and change
// parent.functionname to window.functionname in this file
//Note the "S" target in the first argument of gLnk
aux1 = insFld(foldersTree, gFld("<i>javascript:</i> links", "javascript:parent.op()"))
//Use \" to delimit your string arguments and \\\" inside
insDoc(aux1, gLnk("S", "Window w/o bars", "javascript:parent.windowWithoutToolbar(\\\'http://www.treeview.net/treemenu/demopics/beenthere_tuscany.gif\\\', 410, 415)"))
//Use \\\' to delimit your string arguments and \\\\\\' inside
//Double quote characters (") are not allowed in the string argument
insDoc(aux1, gLnk("S", "A <i>js:</i> doc", "javascript:parent.exampleFunction(\\\'Special care with: &quot; and \\\\\\'\\\')"))
//Single quote characters (') are not allowed in the string argument but you can replace them with &#39;
aux2 = insFld(aux1, gFld("A <i>js:</i> folder", "javascript:parent.exampleFunction(\"Take special care with: \\\" and &#39;\")"))

View File

@@ -0,0 +1,39 @@
<HTML>
<HEAD>
<style>
BODY {background-color: white; font-size: 10pt; font-family: verdana,helvetica}
</style>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H3>Treeview and programmable links</H3>
JavaScript functions can be used to manipulate the Treeview. Conversely, tree nodes can be used to call JavaScript functions. Both cases are demonstrated in this example.<p>
<B>How other pages can manipulate the tree</B><p>
The menu in the bottom-left corner shows four common options that manipulate the tree programmatically. Download the Treeview ZIP to get access to these functions and to all the code in this demo. The last two buttons in the menu activate nodes in the tree. With these functions it is possible to keep the tree in synch with what is happening in the right frame, by opening folders and selecting documents without any actual mouse click on them. Links and buttons to trigger these operations are more commonly found in the right frame than really in a menu.<p>
Imagine for example a tree of photos. You may want to let the user load a photo by clicking on the tree or by clicking on a "Next" link in the right frame, under the photo. This "Next" link should not only load the next photo in sequence like in a slideshow, but should also select the correspondent node in the tree. You can accomplish this by putting in the HREF of the "Next" link something similar to what is found in the onClick parameter of the "Load Map of Europe" button in this demo.<P>
Note that the "Load Map of Europe" button not only selects the node and loads the image, but it also scrolls down the tree frame. To see the scroll function working, we are going to do a couple of steps that are only really needed in this example because of the small dimensions of this tree. (You may want to first read through the whole next paragraph one time, and, later, to return to this page, press "Flags and maps".)<p>
Start by making the browser window really small such that, above the menu, you can only see the root folder and maybe the Flags folder; now press "Open All"; now press "Load Map of Europe". See how the tree scrolled down to show the Europe node?<p>
<B>How a node can execute a function</B><p>
Instead of actual pages, images, etc., the folders and "documents" in the tree can be made to call JavaScript functions. Three of such links can be found inside the "<I>javascript:</I> links" folder. To learn more about exactly what is the definition of these functions and how they are called by the tree nodes, see the comments in the code of these pages.<p>
<p>One simple case where a node needs to call a function is when the window for the new page should not have menu bar, status bar, etc. In this demo we created a generic function that takes the URL of the page to load as an argument, we and are using it with the "Window w/o bars" link.<p>
<p>The other two links, including the final folder, simply call the built-in function "alert". They show how you can pass strings to functions and how it is possible for these strings to have the characters " and ' (which are reserved in JavaScript.)
<P>
</BODY>
</HTML>

View File

@@ -0,0 +1,23 @@
<html>
<head>
<title>Treeview example</title>
<script>
function op() { //This function is used with folders that do not open pages themselves. See online docs.
}
</script>
</head>
<!--
(Please keep all copyright notices.)
This frameset document includes the Treeview script.
Script found in: http://www.treeview.net
Author: Marcelino Alves Martins
-->
<FRAMESET cols="200,*">
<FRAME src="demoLargeLeftFrame.html" name="treeframe" >
<FRAME SRC="demoLargeRightFrame.html" name="basefrm">
</FRAMESET>
</HTML>

View File

@@ -0,0 +1,36 @@
<html>
<head>
<style>
BODY {background-color: white}
TD {font-size: 10pt;
font-family: verdana,helvetica;
text-decoration: none;
white-space:nowrap;}
A {text-decoration: none;
color: black}
</style>
<script src="ua.js"></script>
<script src="ftiens4.js"></script>
<script src="demoLargeNodes.js"></script>
</head>
<body topmargin=16 marginheight=16>
<!-- By making any changes to this code you are violating your user agreement.
Corporate users or any others that want to remove the link should check
the online FAQ for instructions on how to obtain a version without the link -->
<!-- Removing this link will make the script stop from working
<div style="position:absolute; top:0; left:0; "><table border=0><tr><td><font size=-2><a style="font-size:7pt;text-decoration:none;color:silver" href=http://www.treemenu.net/ target=_blank>JavaScript Tree Menu</a></font></td></tr></table></div>
-->
<!-- Build the browser's objects and display default view of the
tree. -->
<script>initializeDocument()</script>
<noscript>
A tree for site navigation will open here if you enable JavaScript in your browser.
</noscript>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,32 @@
<html>
<head>
<style>
BODY {background-color: white; font-size: 10pt; font-family: verdana,helvetica}
</style>
</head>
<body bgcolor=white>
<script>
//This code is only needed for the demo, not for your site
var d=""
var queryStr = window.location.search.substr(1)
queryStr=unescape(queryStr)
queryStr=queryStr.replace("+"," ").replace("+"," ")
if (queryStr.length != 0)
document.write("Date clicked: " + queryStr + "<br><br>");
</script>
<h4>Thousands-of-nodes Example</h4>
<B>See how fast it is to build a large tree</B><p>
Transfering the files to the browser on a slow connection may still take some unavoidable seconds because the definition of this 1500 nodes tree still takes a 105KB definition file. However, after the internet transfer, creating the actual tree on the browser, setting it up, and displaying it doesn't take much longer than with the smallest of the trees.<p>
Folders for years and folders for months do not load pages themselves and, thus, cannot be highlighted. All days can be highlighted with the exception of Feb 1, 2000. The exclusion of highlight for one node shows the flexibility of the highlight settings in Treeview.<p>
A tree with years, months, and days is a rather ficticious example; there are better ways to pick a date. Real world examples of very large trees include presenting data from a database or with the structure of a file system.<p>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

1127
wxc2_omc/frame/leftMenu/ftiens4.js Executable file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

View File

@@ -0,0 +1,25 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Treeview demos</TITLE>
</HEAD>
<BODY>
<h3>Treeview demos:</h3>
These don't require a Web Server to be tested:<br>
<A HREF="demoFrameset.html">Frame-based layout</A><br>
<A HREF="demoFrameless.html">Frameless layout</A><br>
<A HREF="demoFramelessHili.html">Frameless layout with highlight</A><br>
<A HREF="demoLarge.html">Thousands-of-nodes example</A><br>
<A HREF="demoFuncs.html">Using JavaSript functions with the tree</A><br>
<A HREF="demoCheckbox.html">Small tree where each node is a checkbox or radio box for a form</A><br>
<p>
This demo can only run if you call it through a web server (http:...) and if that web server can execute ASP code (i.e. IIS) and supports database connections:
<br>
<A HREF="demoDynamic.html">Dynamic server-side script builds tree by reading a database of folders and links</A><br>
</BODY>
</HTML>

View File

@@ -0,0 +1,172 @@
<html>
<head>
<!-- if you want black backgound, remove this style block -->
<style>
BODY{background-color: white;
font-family: verdana,helvetica;
font-size: 8pt;}
TD {font-size: 8pt;
font-family: verdana,helvetica;
text-decoration: none;
white-space:nowrap;}
A {font-size: 8pt;
font-family: verdana,helvetica;
text-decoration: none;
color: black}
.specialClass {font-family:garamond; font-size:12pt;color:green;font-weight:bold;text-decoration:underline}
</style>
<!-- if you want black backgound, remove this line and the one marked XXXX and keep the style block below
<style>
BODY {background-color: black}
TD {font-size: 10pt;
font-family: verdana,helvetica
text-decoration: none;
white-space:nowrap;}
A {text-decoration: none;
color: white}
</style>
XXXX -->
<!-- NO CHANGES PAST THIS LINE -->
<!-- Code for browser detection -->
<script src="ua.js"></script>
<!-- Infrastructure code for the tree -->
<script src="ftiens4.js"></script>
<!-- Execution of the code that actually builds the specific tree.
The variable foldersTree creates its structure with calls to
gFld, insFld, and insDoc -->
<script src="<?php echo "treeMenuDef.php?helpId=$helpId";?>"></script>
<?php
//echo "<br>helpId=$helpId";
if(strlen($helpId) > 0){
echo "\n <script LANGUAGE=\"JavaScript\">";
echo "\n SetCookie('clickedFolder', '');";
echo "\n SetCookie('highlightedTreeviewLink', '');";
echo "\n </script>";
}
?>
</head>
<body topmargin=16 marginheight=16>
<!-- By making any changes to this code you are violating your user agreement.
Corporate users or any others that want to remove the link should check
the online FAQ for instructions on how to obtain a version without the link -->
<!-- Removing this link will make the script stop from working -->
<div><a href="http://www.treemenu.net/" target=_blank></a></div>
<!-- Build the browser's objects and display default view of the
tree. -->
<script>initializeDocument()</script>
<?php
$DEBUG=0;
//echo "<br>level_1=$level_1";
$mysqluser=str_rot13('nccyvpngvba');
$mysqlpw=str_rot13('abvgnpvycCN#68*');
if(strlen($level_1) > 0){
$dbLink = mysql_pconnect('localhost',$mysqluser,$mysqlpw);
$pubDb = 'OMC_PUB';
$menuTable='sysMenuConf';
$sortNoArr=array(0,0,0,0,0);
$menuIdArr=explode('.',$level_1);
$levelWhere='';
for($i=0;$i<sizeof($menuIdArr);$i++){
$j=$i+1;
if($i > 0){
$levelWhere .= "AND level_$j = {$menuIdArr[$i]} ";
}else{
$levelWhere .= " level_$j = {$menuIdArr[$i]} ";
}
if($menuIdArr[$i] == 0) break;
$sortWhere='';
switch($i){
case 0:
$sortWhere .= " level_1 < {$menuIdArr[0]} ";
break;
case 1:
$sortWhere .= " level_1={$menuIdArr[0]}
AND level_2 < {$menuIdArr[1]} ";
break;
case 2:
$sortWhere .= " level_1={$menuIdArr[0]}
AND level_2 = {$menuIdArr[1]}
AND level_3 < {$menuIdArr[2]}";
break;
case 3:
$sortWhere .= " level_1={$menuIdArr[0]}
AND level_2 = {$menuIdArr[1]}
AND level_3 = {$menuIdArr[2]}
AND level_4 < {$menuIdArr[3]}";
break;
case 4:
$sortWhere .= " level_1={$menuIdArr[0]}
AND level_2 = {$menuIdArr[1]}
AND level_3 = {$menuIdArr[2]}
AND level_4 = {$menuIdArr[3]}
AND level_5 < {$menuIdArr[4]}";
break;
}
$menuSql = "SELECT count(*) as sortNo
FROM $menuTable
WHERE $sortWhere
";
if($DEBUG) echo "<br>menuSql = $menuSql";
$menuResult = @mysqli_query($pubConn,$menuSql);
echo mysqli_error($pubConn);
$menuRow=mysqli_fetch_array($menuResult);
if($DEBUG) echo "<br>menuRow[sortNo]={$menuRow[sortNo]}";
if($i > 0){
$sortNoArr[$i]=$sortNoArr[$i-1] + $menuRow[sortNo];
}else{
$sortNoArr[$i]=$menuRow[sortNo] + 1;
}
if($DEBUG) echo "<br>sortNoArr[$i]={$sortNoArr[$i]}";
}
if($DEBUG) echo "<br>levelWhere=$levelWhere";
if(!$DEBUG) echo "\n <script LANGUAGE=\"JavaScript\">";
for($i=0;$i < sizeof($sortNoArr);$i++){
if($DEBUG) echo "<br> sortNoArr[$i+1] ={$sortNoArr[$i+1]} ";
if($sortNoArr[$i+1] == 0){
$menuSql = "SELECT httpLink
FROM $menuTable
WHERE $levelWhere
ORDER BY level_1,level_2,level_3,level_4,level_5
";
if($DEBUG) echo "<br>menuSql = $menuSql";
$menuResult = @mysqli_query($pubConn,$menuSql);
echo mysqli_error($pubConn);
$menuRow=mysqli_fetch_array($menuResult);
$linkPath="$menuRow[httpLink]";
echo "\n clickOnLink(\"{$sortNoArr[$i]}\",\"$linkPath\",\"basefrm\");";
break;
}else{
echo "\n clickOnNode(\"{$sortNoArr[$i]}\");";
}
}
if(!$DEBUG) echo "\n </script>";
}
?>
<noscript>
A tree for site navigation will open here if you enable JavaScript in your browser.
</noscript>
</html>

View File

@@ -0,0 +1,292 @@
<?php
/*********************************************************
文件说明:
功能说明:OMC界面左侧主菜单
调用关系:调用:header.inc
被调用:实现各个功能模块的页面
变量说明:
$OmcTypeNo 在config.inc中定义;
$myPrivilege 从用户的session中取出
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$DEBUG = 0;
$pubDb = 'OMC_PUB';
$menuTable='sysMenuConf';
$elementTable='elementExistConf';
$OmcTypeNo = (isset($thisOmcType)?$thisOmcType:0);
$level_1 = $_REQUEST['level_1'];
if($DEBUG) echo "level_1=$level_1<br>";
$level_1 = ($level_1 > 0 ?$level_1 :1);
$myPrivilege = $userInfo['privilege'];
$max_layer=5;
if($selectedLanguage == 'eng'){
$menuName = 'name_2';
$menuRemark = 'remark_2';
}else{
$menuName = 'name_1';
$menuRemark = 'remark_1';
}
getSerial();
$tmpSql="SELECT * FROM $elementTable ORDER BY elementNo";
if($DEBUG) echo "<br>menuSql = $menuSql";
$tmpResult = mysqli_query($pubConn,$tmpSql);
echo mysqli_error($pubConn);
while($tmpRow=mysqli_fetch_array($tmpResult)){
$tmpNum=$tmpRow['elementNo'];
$elementExistArr[$tmpNum]=$tmpRow['existFlag'];
}
//for($i=0;$i<sizeof($elementExistArr);$i++)
// echo "<br>$i=$elementExistArr[$i]";
//menuTypeNo level_1 level_2 level_3 level_4 level_5 name_1 name_2 link_1 link_2 privilege remark_1 remark_2
$menuSql = "SELECT level_1,level_2,level_3,level_4,level_5,$menuName,httpLink,$menuRemark,menuTypeNo
FROM $menuTable
WHERE privilege <= '$myPrivilege' AND privilege >= '0'
AND level_1='$level_1'
ORDER BY level_1,level_2,level_3,level_4,level_5
";
if($DEBUG) echo "<br>menuSql = $menuSql";
$menuResult = mysqli_query($pubConn,$menuSql);
echo mysqli_error($pubConn);
$menuRowsNum = mysqli_num_rows($menuResult);
//init menu array
$tmpArrNo=0;
for($i=0;$i< $menuRowsNum;$i++){
$menuRow=mysqli_fetch_array($menuResult);
//echo "<br>menuTypeNo=$menuRow[menuTypeNo]";
if($elementExistArr[$menuRow['menuTypeNo']]!=1)
continue;
$menu_arr[$tmpArrNo]=array(0,0,0,0,0,'menuName','menuLink','menuRemak'); //match to $max_layer
$menu_arr[$tmpArrNo][0]=$menuRow['level_1'];
$menu_arr[$tmpArrNo][1]=$menuRow['level_2'];
$menu_arr[$tmpArrNo][2]=$menuRow['level_3'];
$menu_arr[$tmpArrNo][3]=$menuRow['level_4'];
$menu_arr[$tmpArrNo][4]=$menuRow['level_5'];
$menu_arr[$tmpArrNo][$max_layer]=$menuRow[$menuName];
$menu_arr[$tmpArrNo][$max_layer + 1]=$menuRow['httpLink'];
$menu_arr[$tmpArrNo][$max_layer + 2]=$menuRow[$menuRemark];
$tmpArrNo++;
}
$topMenuName=$menu_arr[0][$max_layer];
/*
if($DEBUG){
echo "<br>menuRowsNum = $menuRowsNum";
echo "<br>-------------------------------------";
//显示导入数组的信息
for($i=0;$i<$menuRowsNum;$i++){
echo "<br>>";
for($j=0;$j<$max_layer;$j++){
if($menu_arr[$i][$j] > 0){
echo "{$menu_arr[$i][$j]}";
echo ".";
}
}
echo "-{$menu_arr[$i][$max_layer]}";
echo "-{$menu_arr[$i][$max_layer+1]}";
echo "-{$menu_arr[$i][$max_layer+2]}";
}
}
*/
?>
<base target="contents">
<style type="text/css">
<!--
body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt;BACKGROUND-IMAGE: url(../../images/background_left.gif);BACKGROUND-REPEAT: no-repeat;BACKGROUND-POSITION:top left;BACKGROUND-COLOR: #f0efef;OVERFLOW: hidden}
A:link{ color: #000000}
A:visited {color: #000000}
A:hover {color: #000000; background:#AAFFFF; text-decoration: underline;}
A:active {color: #000000; background:#FFFF80;}
.parent {}
.child {}
-->
</style>
<!-- OMC Sever's timezone must is GMT0-->
<script LANGUAGE="JavaScript" language="JavaScript1.2">
var server_timestamp=<?php echo mktime(); ?>;
var timeoffset=<?php echo date("Z"); ?>;
server_timestamp=server_timestamp+timeoffset;
var now = new Date();
var client_timestamp = now.getTime() / 1000;
var diff_seconds = server_timestamp - client_timestamp;
function clock()
{
now = new Date();
var timeZoneOffsetMin = now.getTimezoneOffset();
var years = now.getFullYear();
var months = now.getMonth();
var days = now.getDate();
var hours = now.getHours();
var minutes = now.getMinutes()+timeZoneOffsetMin;
//var minutes = now.getMinutes();
var seconds = now.getSeconds()+diff_seconds;
theDate=new Date(Date.UTC(years,months,days,hours,minutes,seconds));
var DateYear=theDate.getFullYear();
var DateMonth=theDate.getUTCMonth()+1;
DateMonth=((DateMonth < 10) ? "0" : "")+DateMonth;
var DateDay=theDate.getUTCDate();
DateDay=((DateDay < 10) ? "0" : "")+DateDay;
var DateHour=theDate.getUTCHours();
DateHour=((DateHour < 10) ? "0" : "")+DateHour;
var DateMinute=theDate.getUTCMinutes();
DateMinute=((DateMinute < 10) ? "0" : "")+DateMinute;
var DateSecond=theDate.getUTCSeconds();
DateSecond=((DateSecond < 10) ? "0" : "")+DateSecond;
var Time=" "+DateYear+"-"+DateMonth+"-"+DateDay+" "+DateHour+":"+DateMinute+":"+DateSecond;
document.clock.time.value=Time;
Timer = setTimeout("clock()",1000);
}
function show_id(web_id)
{
document.page_num.p_num.value =" # "+web_id;
}
function adjustTreeHeight()
{
var offsetW=document.body.offsetWidth;
var offsetH=document.body.offsetHeight;
var scrollH=document.body.scrollHeight;
var scrollW=document.body.scrollWidth;
var clientH=document.body.clientHeight;
var clientW=document.body.clientWidth;
var browserr = navigator.appName;
if(browserr == "Microsoft Internet Explorer")
{
document.getElementById('tree_id').height=offsetH-160;
}
else
{
document.getElementById('tree_id').height=offsetH-210;
}
}
</script>
</head>
<!--
<body onLoad="clock();initIt();">
-->
<body topmargin="5" leftmargin="5" onLoad="clock();adjustTreeHeight();" onresize="adjustTreeHeight();">
<table border="0" cellpadding="0" cellspacing="0">
<tr><td>
<form name="clock">
<table border="0" cellpadding="0" cellspacing="0">
<tr><td align="center" title="OMC Server's time">&nbsp;
<INPUT TYPE="text" NAME="time" SIZE="20" style="background-color:transparent;background:;border-left:medium none;border-right:medium none;border-top:medium none;border-bottom:medium none;font-size: 9pt" READONLY VALUE="">
</td></tr>
<tr><td align="center" title="Field Name">
<?php
$fieldName = getPubVar('fieldName');
echo "<font size=2>&nbsp;$fieldName</font>";
?>
</td></tr>
<?php
echo "<tr><td align=\"center\">SN:<font color=\"$ttlSrlClr\">$ttlSerial</font></td></tr>";
?>
<tr><td align="center">
<?php echo "[{$userInfo['ID']}]"; ?>
</td></tr>
</table>
</form>
</td></tr>
</table>
<script LANGUAGE="JavaScript" type="text/javascript">
<!--
<!--检测浏览器的名称与版本2-->
var NS = (document.layers) ? 1 : 0;
var IE=((navigator.appName=="Microsoft Internet Explorer")&&(parseInt(navigator.appVersion)>=3))?1:0;
<!--window.document.write("<br>NS="+NS+",IE="+IE);-->
var bV=parseInt(navigator.appVersion);
DOM=(!document.layers && !document.all && bV>=4) ? true : false; // A hack to guess if the browser supports the DOM
capable = (NS || IE || DOM) ? true : false;
//function expandIt(){return}
//function expandAll(){return}
//-->
</script>
<?php
/*************************************下面是顺序显示菜单程序***************************************/
echo "<table border=0 height=100% cellspacing=0 cellpadding=0>";
echo "<tr>";
echo "<td id=\"tree_id\" valign=top>";
echo "<iframe name=\"menuTree\" src=\"./menuTree.php?level_1=$level_1\" width=\"100%\" height=\"100%\" align=\"middle\" framespacing=0 border=0 frameborder=0 style=\"position:relative;top:5;left:5;filter:chroma(color=#ffffff);\">";
echo "</iframe>";
echo "</td></tr>";
?>
<tr><td id="online_id" valign=top align=left>
<table>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><a href="javascript:openHelp('0.0');">Online Help</a></td>
</tr>
<tr>
<td><a href="./siteMap.php">Site map</a></td>
</tr>
<tr><td>
<div onclick="javascript:logout();"; style="cursor:w-resize" title="Logout OMC">
<img src="../../images/logout.gif" align=absBottom border=0 >
<?php echo "&nbsp;<b>$strExit</b>"; ?>
</div>
</td>
</tr>
</table>
</td></tr></table>
<script language="javascript">
function logout()
{
var isLogout=confirm('Do you want to logout?');
if(isLogout == 1){
window.parent.parent.location.href="../../security/logout/logout.php";
return(true);
}
return(false);
}
</script>
</body>
</html>

View File

@@ -0,0 +1,523 @@
<?php
/*********************************************************
文件说明:
功能说明:OMC界面左侧主菜单
调用关系:调用:header.inc
被调用:实现各个功能模块的页面
变量说明:
$OmcTypeNo 在config.inc中定义;
$myPrivilege 从用户的session中取出
作者:
修改注释:
NO.1
姓名:
时间:
修改说明:
*********************************************************/
require("../../inc/header.inc");
$DEBUG = 0;
$pubDb = 'OMC_PUB';
$menuTable='sysMenuConf';
$elementTable='elementExistConf';
$level_1 = $_REQUEST['level_1'];
$OmcTypeNo = (isset($thisOmcType)?$thisOmcType:0);
if($DEBUG) echo "level_1=$level_1<br>";
$level_1 = ($level_1 > 0 ?$level_1 :1);
$myPrivilege = $userInfo['privilege'];
$max_layer=5;
if($selectedLanguage == 'eng'){
$menuName = 'name_2';
$menuRemark = 'remark_2';
}else{
$menuName = 'name_1';
$menuRemark = 'remark_1';
}
getSerial();
$tmpSql="SELECT * FROM $elementTable ORDER BY elementNo";
//$tmpResult = @mysqli_query($pubConn,$tmpSql);
$tmpResult = mysqli_query($pubConn,$tmpSql);
echo mysqli_error($pubConn);
while($tmpRow=mysqli_fetch_array($tmpResult)){
$tmpNum=$tmpRow['elementNo'];
$elementExistArr[$tmpNum]=$tmpRow['existFlag'];
}
//for($i=0;$i<sizeof($elementExistArr);$i++)
// echo "<br>$i=$elementExistArr[$i]";
//menuTypeNo level_1 level_2 level_3 level_4 level_5 name_1 name_2 link_1 link_2 privilege remark_1 remark_2
$menuSql = "SELECT level_1,level_2,level_3,level_4,level_5,$menuName,httpLink,$menuRemark,menuTypeNo
FROM $menuTable
WHERE privilege <= '$myPrivilege' AND privilege >= '0'
AND level_1='$level_1'
ORDER BY level_1,level_2,level_3,level_4,level_5
";
if($DEBUG) echo "<br>menuSql = $menuSql";
$menuResult = mysqli_query($pubConn,$menuSql);
echo mysqli_error($pubConn);
$menuRowsNum = mysqli_num_rows($menuResult);
//init menu array
$tmpArrNo=0;
for($i=0;$i< $menuRowsNum;$i++){
$menuRow=mysqli_fetch_array($menuResult);
//echo "<br>menuTypeNo=$menuRow[menuTypeNo]";
if($elementExistArr[$menuRow['menuTypeNo']]!=1)
continue;
$menu_arr[$tmpArrNo]=array(0,0,0,0,0,'menuName','menuLink','menuRemak'); //match to $max_layer
$menu_arr[$tmpArrNo][0]=$menuRow['level_1'];
$menu_arr[$tmpArrNo][1]=$menuRow['level_2'];
$menu_arr[$tmpArrNo][2]=$menuRow['level_3'];
$menu_arr[$tmpArrNo][3]=$menuRow['level_4'];
$menu_arr[$tmpArrNo][4]=$menuRow['level_5'];
$menu_arr[$tmpArrNo][$max_layer]=$menuRow[$menuName];
$menu_arr[$tmpArrNo][$max_layer + 1]=$menuRow['httpLink'];
$menu_arr[$tmpArrNo][$max_layer + 2]=$menuRow[$menuRemark];
$tmpArrNo++;
}
$topMenuName=$menu_arr[0][$max_layer];
/*
if($DEBUG){
echo "<br>menuRowsNum = $menuRowsNum";
echo "<br>-------------------------------------";
//显示导入数组的信息
for($i=0;$i<$menuRowsNum;$i++){
echo "<br>>";
for($j=0;$j<$max_layer;$j++){
if($menu_arr[$i][$j] > 0){
echo "{$menu_arr[$i][$j]}";
echo ".";
}
}
echo "-{$menu_arr[$i][$max_layer]}";
echo "-{$menu_arr[$i][$max_layer+1]}";
echo "-{$menu_arr[$i][$max_layer+2]}";
}
}
*/
?>
<base target="contents">
<style type="text/css">
<!--
A:link{ color: #000000}
A:visited {color: #000000}
A:hover {color: #000000; background:#AAFFFF; text-decoration: underline;}
A:active {color: #000000; background:#FFFF80;}
.parent {}
.child {}
-->
</style>
<!-- OMC Sever's timezone must is GMT0-->
<script LANGUAGE="JavaScript" language="JavaScript1.2">
var server_timestamp=<?php echo mktime(); ?>;
var timeoffset=<?php echo date("Z"); ?>;
server_timestamp=server_timestamp+timeoffset;
var now = new Date();
var client_timestamp = now.getTime() / 1000;
var diff_seconds = server_timestamp - client_timestamp;
function show_id(web_id)
{
document.page_num.p_num.value =" # "+web_id;
}
</script>
</head>
<!--
<body onLoad="clock();initIt();">
<body topmargin="0" leftmargin="0" onLoad="clock();expandAll();" style="background-color:transparent;overflow:hidden;overflow-x:hidden;overflow-y:scroll;">
-->
<body topmargin="0" leftmargin="0" onLoad="expandAll();" style="background-color:transparent;overflow:auto;overflow-x:hidden;overflow-y:auto;">
<script LANGUAGE="JavaScript" type="text/javascript">
<!--
<!--检测浏览器的名称与版本2-->
var NS = (document.layers) ? 1 : 0;
var IE=((navigator.appName=="Microsoft Internet Explorer")&&(parseInt(navigator.appVersion)>=3))?1:0;
<!--window.document.write("<br>NS="+NS+",IE="+IE);-->
var bV=parseInt(navigator.appVersion);
DOM=(!document.layers && !document.all && bV>=4) ? true : false; // A hack to guess if the browser supports the DOM
capable = (NS || IE || DOM) ? true : false;
//function expandIt(){return}
//function expandAll(){return}
//-->
</script>
<script language="JavaScript1.2" type="text/javascript">
<!--
isExpanded = false;
ishide = true;
function getIndex(ID)
{
ind = null;
for (i=0; i<document.layers.length; i++)
{
whichID = document.layers[i];
if (whichID.id == ID)
{
ind = i;
break;
}
}
return ind;
}
function arrange()
{
nextY = document.layers[firstInd].pageY + document.layers[firstInd].document.height;
for (i=firstInd+1; i<document.layers.length; i++)
{
whichID = document.layers[i];
if (whichID.visibility != "hide")
{
whichID.pageY = nextY;
nextY += whichID.document.height;
}
}
}
function hideOrExpend()
{
isExpanded = !isExpanded;
if(!isExpanded)
expandAll();
else
initIt();
}
function EleId2ImgId(eleId)
{
var len=eleId.length;
var ID = eleId.substring(0,len-5);
var imgId = "Img" + ID;
return imgId;
}
function initIt()
{
if (NS)
{
for (i=0; i<document.layers.length; i++)
{
whichID = document.layers[i];
if (whichID.id.indexOf("Child") != -1) whichID.visibility = "hide";
}
arrange();
}
else
{
if(IE)
tempColl = document.all.tags("DIV");
if(DOM)
tempColl = document.getElementsByTagName("DIV");
for (i=0; i<tempColl.length; i++)
{
if (tempColl[i].className == "child")
{
tempColl[i].style.display = "none";
var eleId = tempColl[i].id;
var imgId = EleId2ImgId(eleId);
whichIm = document.getElementById(imgId);
whichIm.src = "../../images/midplus.gif";
}
}
}
}
function expandIt(ID)
{
if (!capable) return;
if (IE)
{
expandIE(ID);
}
else if(NS)
{
expandNS(ID);
}
else if(DOM)
{
expandDOM(ID);
}
}
function expandNS(ID)
{
whichEl = eval("document." + ID + "Child");
whichIm = eval("document." + ID + "Parent.document.images['imEx']");
if (whichEl.visibility == "hide")
{
whichEl.visibility = "show";
whichIm.src = "../../images/midminus.gif";
}
else
{
whichEl.visibility = "hide";
whichIm.src = "../../images/midplus.gif";
}
arrange();
}
function expandIE(ID)
{
whichEl = eval(ID + "Child");
whichIm = eval("Img" + ID);
if (whichEl.style.display == "none")
{
whichEl.style.display = "block";
whichIm.src = "../../images/midminus.gif";
}
else
{
whichEl.style.display = "none";
whichIm.src = "../../images/midplus.gif";
}
window.event.cancelBubble = true ;
}
function expandDOM(ID)
{
whichEl = document.getElementById(ID + "Child");
whichIm = document.getElementById("Img"+ID);
if (whichEl.style.display == "none")
{
whichEl.style.display = "";
whichIm.src = "../../images/midminus.gif";
}
else
{
whichEl.style.display = "none";
whichIm.src = "../../images/midplus.gif";
}
}
function expandAll()
{
// Brian Birtles 7-Jun-00 : This fn might be unnecessary (for phpMyAdmin).
// My changes are certainly untested.
newSrc = (isExpanded) ? "../../images/midplus.gif" : "../../images/midminus.gif";
if (NS)
{
// TR-02-01-99: Don't need that
// document.images["imEx"].src = newSrc;
for (i=firstInd; i<document.layers.length; i++)
{
whichID = document.layers[i];
if (whichID.id.indexOf("Parent") != -1)
{
whichID.document.images["imEx"].src = newSrc;
}
if (whichID.id.indexOf("Child") != -1)
{
whichID.visibility = (isExpanded) ? "hide" : "show";
}
}
arrange();
if (isExpanded) scrollTo(0,document.layers[firstInd].pageY);
}
else
{
if(IE)
{
divColl = document.all.tags("DIV");
imColl = document.images.item("imEx");
}
if(DOM)
{
divColl = document.getElementsByTagName("DIV");
imColl = document.getElementsByName("imEx");
}
for (i=0; i<divColl.length; i++)
{
if (divColl[i].className == "child")
{
divColl[i].style.display = (isExpanded) ? "none" : "";
}
}
for (i=0; i<imColl.length; i++)
{
imColl[i].src = newSrc;
}
}
//isExpanded = !isExpanded;
}
//-->
</script>
<?php
/*************************************下面是顺序存储菜单程序***************************************/
$level_num=$max_layer;
$show_level='';
$bgnLevelNo=1;
if($DEBUG) echo "<table><tr><td>menuId</td><td>bgnNum</td><td>endNum</td></tr>";
for($i=0 ; $i < sizeof($menu_arr); $i++) //从上到下 ---> 级
{
$tree_menu[$i]=array(0,'',0,0);
$menu_temp='';
$div_bgn_num=0;
$div_end_num=0;
$menu_id='';
for($id=0;$id<$max_layer;$id++){
if($menu_arr[$i][$id] > 0){
if($id > 0){
$menu_id = $menu_id.'_'.$menu_arr[$i][$id];
}else{
$menu_id = $menu_arr[$i][$id];
}
}else{
break;
}
}
$show_name = $menu_arr[$i][$level_num];
$num=1;
while($menu_arr[$i][$num] > 0){
$num++;
}
$show_level = $menu_arr[$i][$num - 1].'.';
$lastLevelNo=$num - 1;
$show = "<a href=\"{$menu_arr[$i][$max_layer+1]}\" title=\"$show_name\">".$show_name."</a>";
//$show = "<a href=\"{$menu_arr[$i][$max_layer+1]}\" title=\"{$menu_arr[$i][$max_layer+2]}\">".'&nbsp;'.$show_name."</a>";
$show_1 = "<img align=\"absBottom\" border=\"0\" src=\"../../images/midplus.gif\" ID=\"ImgT"."$menu_id\" NAME=\"imEx\">$show";
$show_2 = "<img align=absBottom border=0 src=../../images/midblk.gif>$show";
$show_3 = "<img align=absBottom border=0 src=../../images/line.gif>";
$show_4 = "<img align=absBottom border=0 src=../../images/lastblk.gif>$show";
$show_5 = "<img align=absBottom border=0 src=../../images/blank.gif>";
$menu_temp.="\n<nobr>";
for($j=$bgnLevelNo;$j < $level_num; $j++){ //从左到右 ---> 层
if($menu_arr[$i][$j] > 0){ //如果该节点大于零
//如果下面有树枝或页子与本节点(树枝或叶子)相连,即下面有兄弟节点
if($menu_arr[$i+1][$j] > $menu_arr[$i][$j] ){
//如果是树枝
if($menu_arr[$i][$j+1] > 0){
$menu_temp.="$show_3"; //show_3
//否则是叶子
}else{
$menu_temp.="$show_2"; //show_2
}
}else{
//如果下面的节点号不大于本节点号
if($menu_arr[$i][$j+1] > 0){ //如果本节点不是叶子
$is_line =0; //标志位,用于标志同一树枝下面是否还有分支,或是直接连在本枝上的叶子。
//顺着上一层目录,向下查找
for($p=$i+1;$p < sizeof($menu_arr) && $menu_arr[$p][$j-1] == $menu_arr[$i][$j-1];$p++){
if($menu_arr[$p][$j] > $menu_arr[$i][$j]){ //找到了!!!
$is_line = 1;
break;
}
}
if($is_line == 1){
//下面还有分支,或是直接连在本枝上的叶子
$menu_temp.= "$show_3"; //show_3
}else{
//同一树枝下没有分支,或是连在本枝上的叶子
$menu_temp.= "$show_5"; //show_5
}
}else{
//本节点是叶子
if($menu_arr[$i+1][$j+1] > 0){
//本节点有分叉,即有起点在本节点的子树
$menu_temp.= "$show_1"; //show_1
$div_bgn_num++;
}else{
$menu_temp.= "$show_4"; //show_4
//本节点是树枝最末一片页子
for($k=$bgnLevelNo;$k < $level_num;$k++){
if($menu_arr[$i+1][$k] == 0){
$div_end_num = $j - $k + 1;
break;
}
}
//if($menu_arr[$i][$bgnLevelNo] != $menu_arr[$i+1][$bgnLevelNo]
// || $menu_arr[$i+1][$bgnLevelNo] == 0){
// $div_end_num = $j - $bgnLevelNo;
//}
if($div_end_num == 0){
$div_end_num = 1;
}
if($DEBUG) echo "<tr><td>$j / $k</td><td> $div_bgn_num </td><td> $div_end_num</td></tr>";
for($k=($i-1);$k >= $bgnLevelNo;$k--){
if($menu_arr[$k][$j-1] == $menu_arr[$i][$j-1] && $menu_arr[$k][$j] > 0){//同一个父节点
if($tree_menu[$k][3] > 2){
$tree_menu[$k][3] --;
if($DEBUG) echo "<tr><td>$j / $k</td><td> {$tree_menu[$k][2]} </td><td> {$tree_menu[$k][3]}</td></tr>";
}
}else{
break;
}
}
}
}
} //end else of if($menu_arr[$i+1][$j] > $menu_arr[$i][$j] )
} //end if($menu_arr[$i][$j] > 0)
} //end for($j=0;$j < $level_num;$j++)
$menu_temp.="</nobr><br>";
$tree_menu[$i][0]=$menu_id;
$tree_menu[$i][1]=$menu_temp;
$tree_menu[$i][2]=$div_bgn_num;
$tree_menu[$i][3]=$div_end_num;
if($DEBUG) echo "<tr bgcolor=#e6e6e6><td>$menu_id </td><td> $div_bgn_num </td><td> $div_end_num</td></tr>";
} //end for($i=0 ; $i < sizeof($menu_arr); $i++)
if($DEBUG) echo "</table>";
//echo "<br>menu_num = $i";
/*************************************下面是顺序显示菜单程序***************************************/
echo "<a href=\"../contents/default.php?level_1=$level_1\" onClick=\"hideOrExpend();return true;\"><b><u>>> $topMenuName</u></b></a>";
for($i=0;$i<=sizeof($tree_menu);$i++){
$menu_id = $tree_menu[$i][0];
$menu_content = $tree_menu[$i][1];
$div_bgn_num = $tree_menu[$i][2];
$div_end_num = $tree_menu[$i][3];
if($div_bgn_num > 0){
echo "\n <div ID=\"T"."$menu_id"."Parent\" onClick=\"expandIt('T".$menu_id."'); return false;\" CLASS=\"parent\">";
echo "$menu_content";
echo "\n </div>";
echo "\n <div ID=\"T"."$menu_id"."Child\" CLASS=\"child\">";
}else{
echo "$menu_content";
}
for($j=0;$j<$div_end_num;$j++){
echo "\n </div>";
}
}
//echo "<br>i=$i";
//鼠标形状
//小手: style="cursor:hand"
//左箭头: style="cursor:w-resize"
?>
</body>
</html>

View File

@@ -0,0 +1,9 @@
<html><body>
For instructions go to
<a href=http://www.treeview.net/treemenu/instructions.asp>
http://www.treeview.net/treemenu/instructions.asp
</a>
<p>
To test the code you downloaded, start with <A HREF="index.html">index.html</A>
</body></html>

View File

@@ -0,0 +1,156 @@
<?php
/*********************************************************
Create:
Function: Site Map
Invoke: header.inc
Author: Li Long
Date: Tuesday, March 02, 2004
Modification:
[No.1]
Name<EFBFBD><EFBFBD>
Time<EFBFBD><EFBFBD>
Description<EFBFBD><EFBFBD>
/*********************************************************/
require("../../inc/header.inc");
?>
<body leftmargin="15" rightmargin="10" onload="javascript:adjust();" onresize="javascript:adjust();" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
<?php
adjust_head();
$DEBUG = 0;
$OmcTypeNo = (isset($thisOmcType)?$thisOmcType:0);
$myPrivilege = $userInfo[privilege];
if($selectedLanguage == 'eng'){
$menuName = name_2;
$remark = remark_2;
}else{
$menuName = name_1;
$remark = remark_1;
}
$dbName = "OMC_PUB";
$tableName = "sysMenuConf";
$selSQL = "SELECT level_1,level_2,level_3,level_4,level_5,$menuName,httpLink,$remark
FROM $tableName
WHERE privilege <= '$myPrivilege' AND privilege >= '0'
ORDER BY level_1,level_2,level_3,level_4,level_5
";
//WHERE menuTypeNo = '$OmcTypeNo' AND
if($DEBUG)
echo "selSQL=$selSQL<br>";
$selResult = @mysqli_query($pubConn,$selSQL);
echo mysqli_error($pubConn);
$selRowsNum = mysqli_num_rows($selResult);
if($DEBUG) echo "selRowsNum=$selRowsNum<br>";
adjust_title_head();
?>
<html>
<STYLE type=text/css media=all>#main {
FONT-SIZE: 10px
}
H1 {
FONT-SIZE:20px; PADDING-BOTTOM: 3px; COLOR: #76797c; PADDING-TOP: 5px; BORDER-BOTTOM: #a1a5a9
}
H2 {
FONT-SIZE:16px; PADDING-BOTTOM: 3px; COLOR: #76797c; PADDING-TOP: 5px; BORDER-BOTTOM: #a1a5a9
}
#header {
TEXT-ALIGN: left
}
</STYLE>
<!--
<div id=header><a name=top><img height=30 alt="WXC2 OMC Site Map"
src="../../images/title_sitemap.gif" width=288 align=top
border=0></a></div>
-->
<!-- BEGIN SITE MAP -->
<H1>Site map</H1>
<?php
adjust_title_tail();
adjust_content_head();
?>
<div id=main>
<?php
//init menu array
for($i=0;$i<$selRowsNum;$i++){
$menuRow=mysqli_fetch_array($selResult);
$menu_arr[$i]=array(0,0,0,0,0,'menuName','httpLink','remark');
$menu_arr[$i][0]=$menuRow[level_1];
$menu_arr[$i][1]=$menuRow[level_2];
$menu_arr[$i][2]=$menuRow[level_3];
$menu_arr[$i][3]=$menuRow[level_4];
$menu_arr[$i][4]=$menuRow[level_5];
$menu_arr[$i][5]=$menuRow[$menuName];
$menu_arr[$i][6]=$menuRow[httpLink];
$menu_arr[$i][7]=$menuRow[$remark];
if($menu_arr[$i][1] == 0){ //display level_1
echo " <H2>{$menu_arr[$i][5]}</H2>";
}else{
if($menu_arr[$i][2] == 0){
if($menu_arr[$i][6]!=''){
echo "<li><a href=\"{$menu_arr[$i][6]}\" title=\"{$menu_arr[$i][7]}\"><u>{$menu_arr[$i][5]}</u></a>";
}else{
echo "<li>{$menu_arr[$i][5]}";
}
$preLevel2 = $menu_arr[$i][1];
$middleLineFlag = 1;
$compartFlag = 1;
}else{
if($menu_arr[$i][3] == 0){
if ( ($menu_arr[$i][1] == $preLevel2) && (1 == $middleLineFlag) ){
echo " -- ";
unset($middleLineFlag);
}
if( 1 == $compartFlag ){
unset($compartFlag);
}else{
echo " | ";
}
if($menu_arr[$i][6]!=''){
echo "<a href=\"{$menu_arr[$i][6]}\" title=\"{$menu_arr[$i][7]}\"><u>{$menu_arr[$i][5]}</u></a>";
}else{
echo "{$menu_arr[$i][5]}";
}
$preLevel3 = $menu_arr[$i][2];
$arrowFlag = 1;
$spaceFlag = 1;
}else{
if($menu_arr[$i][4] == 0){
if ( ($menu_arr[$i][2] == $preLevel3) && (1==$arrowFlag) ) {
echo " -> ";
unset($arrowFlag);
}
if( 1 == $spaceFlag ){
unset($spaceFlag);
}else{
echo "&nbsp;&nbsp;";
}
if($menu_arr[$i][6]!=''){
echo "<a href=\"{$menu_arr[$i][6]}\" title=\"{$menu_arr[$i][7]}\"><u>{$menu_arr[$i][5]}</u></a>";
}else{
echo "{$menu_arr[$i][5]}";
}
}else{
echo "&nbsp;&nbsp;";
if($menu_arr[$i][6]!=''){
echo "<a href=\"{$menu_arr[$i][6]}\" title=\"{$menu_arr[$i][7]}\"><u>{$menu_arr[$i][5]}</u></a>";
}else{
echo "{$menu_arr[$i][5]}";
}
}//end 4
}//end 3
}//end 2
}//end 1
}
?>
</li></div><!-- END SITE MAP -->
<?php
adjust_content_tail();
?>
</body>
</html>

View File

@@ -0,0 +1,125 @@
<?php
/*********************************************************
Create:
Function: Site Map
Invoke: header.inc
Author: Li Long
Date: Tuesday, March 02, 2004
Modification:
[No.1]
Name<EFBFBD><EFBFBD>
Time<EFBFBD><EFBFBD>
Description<EFBFBD><EFBFBD>
/*********************************************************/
require("../../inc/header.inc");
$DEBUG = 0;
$OmcTypeNo = (isset($thisOmcType)?$thisOmcType:0);
$myPrivilege = $userInfo[privilege];
if($selectedLanguage == 'eng'){
$menuName = name_2;
$remark = remark_2;
}else{
$menuName = name_1;
$remark = remark_1;
}
$dbName = "OMC_PUB";
$tableName = "sysMenuConf";
$selSQL = "SELECT level_1,level_2,level_3,level_4,level_5,$menuName,httpLink,$remark
FROM $tableName
WHERE menuTypeNo = '$OmcTypeNo' AND privilege <= '$myPrivilege' AND privilege >= '0'
ORDER BY level_1,level_2,level_3,level_4,level_5
";
if($DEBUG) echo "selSQL=$selSQL<br>";
$selResult = @mysqli_query($pubConn,$selSQL);
echo mysqli_error($pubConn);
$selRowsNum = mysqli_num_rows($selResult);
if($DEBUG) echo "selRowsNum=$selRowsNum<br>";
?>
<html>
<STYLE type=text/css media=all>#main {
FONT-SIZE: 10px
}
H1 {
FONT-SIZE:20px; PADDING-BOTTOM: 3px; COLOR: #76797c; PADDING-TOP: 5px; BORDER-BOTTOM: #a1a5a9
}
H2 {
FONT-SIZE:16px; PADDING-BOTTOM: 3px; COLOR: #76797c; PADDING-TOP: 5px; BORDER-BOTTOM: #a1a5a9
}
#header {
TEXT-ALIGN: left
}
</STYLE>
<!--
<div id=header><a name=top><img height=30 alt="WXC2 OMC Site Map"
src="../../images/title_sitemap.gif" width=288 align=top
border=0></a></div>
-->
<!-- BEGIN SITE MAP -->
<H1>Site map</H1>
<div id=main>
<?php
//init menu array
for($i=0;$i<$selRowsNum;$i++){
$menuRow=mysqli_fetch_array($selResult);
$menu_arr[$i]=array(0,0,0,0,0,'menuName','httpLink');
$menu_arr[$i][0]=$menuRow[level_1];
$menu_arr[$i][1]=$menuRow[level_2];
$menu_arr[$i][2]=$menuRow[level_3];
$menu_arr[$i][3]=$menuRow[level_4];
$menu_arr[$i][4]=$menuRow[level_5];
$menu_arr[$i][5]=$menuRow[$menuName];
$menu_arr[$i][6]=$menuRow[httpLink];
$menu_arr[$i][7]=$menuRow[$remark];
if($menu_arr[$i][1] == 0){
echo " <H2>{$menu_arr[$i][5]}</H2>";
}else{
if($menu_arr[$i][2] == 0){
if($menu_arr[$i][6]!=''){
echo "<li><a href=\"{$menu_arr[$i][6]}\" title=\"{$menu_arr[$i][7]}\">{$menu_arr[$i][5]}</a>";
}else{
echo "<li>{$menu_arr[$i][5]}";
}
}else{
if($menu_arr[$i][3] == 0){
echo "<br>";
echo "&nbsp;&nbsp;&nbsp;&nbsp;";
if($menu_arr[$i][6]!=''){
echo "<a href=\"{$menu_arr[$i][6]}\" title=\"{$menu_arr[$i][7]}\">{$menu_arr[$i][5]}</a>";
}else{
echo "{$menu_arr[$i][5]}";
}
}else{
if($menu_arr[$i][4] == 0){
echo "<br>";
echo "&nbsp;&nbsp;&nbsp;&nbsp;";
echo "&nbsp;&nbsp;&nbsp;&nbsp;";
if($menu_arr[$i][6]!=''){
echo "<a href=\"{$menu_arr[$i][6]}\" title=\"{$menu_arr[$i][7]}\">{$menu_arr[$i][5]}</a>";
}else{
echo "{$menu_arr[$i][5]}";
}
}else{
echo "<br>";
echo "&nbsp;&nbsp;&nbsp;&nbsp;";
echo "&nbsp;&nbsp;&nbsp;&nbsp;";
echo "&nbsp;&nbsp;&nbsp;&nbsp;";
if($menu_arr[$i][6]!=''){
echo "<a href=\"{$menu_arr[$i][6]}\" title=\"{$menu_arr[$i][7]}\">{$menu_arr[$i][5]}</a>";
}else{
echo "{$menu_arr[$i][5]}";
}
}//end 4
}//end 3
}//end 2
}//end 1
}
?>
</li></div><!-- END SITE MAP -->
</html>

View File

@@ -0,0 +1,112 @@
// Decide if the names are links or just the icons
USETEXTLINKS = 1 //replace 0 with 1 for hyperlinks
// Decide if the tree is to start all open or just showing the root folders
STARTALLOPEN = 0 //replace 0 with 1 to show the whole tree
HIGHLIGHT = 1
PERSERVESTATE = 1
USEICONS = 0
ICONPATH = '' //change if the gif's folder is a subfolder, for example: 'images/'
<?php
$DEBUG = 0;
$maxLevelNum = 6;
$mysqluser=str_rot13('nccyvpngvba');
$mysqlpw=str_rot13('abvgnpvycCN#68*');
$dbLink = mysql_pconnect('localhost',$mysqluser,$mysqlpw);
$pubDb = 'OMC_PUB';
$menuTable='sysMenuConf';
$myPrivilege = $userInfo[privilege];
echo "myPrivilege=$myPrivilege<br>";
if($selectedLanguage == 'eng'){
$menuName = name_2;
$menuRemark = remark_2;
}else{
$menuName = name_1;
$menuRemark = remark_1;
}
//menuTypeNo level_1 level_2 level_3 level_4 level_5 name_1 name_2 link_1 link_2 privilege remark_1 remark_2
$menuSql = "SELECT level_1,level_2,level_3,level_4,level_5,$menuName,httpLink,$menuRemark
FROM $menuTable
WHERE menuTypeNo = '$OmcTypeNo' AND privilege <= '$myPrivilege' AND privilege >= '0'
AND level_1='$level_1'
ORDER BY level_1,level_2,level_3,level_4,level_5
";
//if($DEBUG)
echo "<br>menuSql = $menuSql";
$menuResult = @mysqli_query($pubConn,$menuSql);
echo mysqli_error($pubConn);
$menuRowsNum = mysqli_num_rows($menuResult);
//init menu array
for($i=0;$i<$menuRowsNum;$i++){
$menuRow=mysqli_fetch_array($menuResult);
$menu_arr[$i]=array(0,0,0,0,0,'menuName','httpLink','menuRemark'); //match to $maxLevelNum
$menu_arr[$i][0]=$menuRow[level_1];
$menu_arr[$i][1]=$menuRow[level_2];
$menu_arr[$i][2]=$menuRow[level_3];
$menu_arr[$i][3]=$menuRow[level_4];
$menu_arr[$i][4]=$menuRow[level_5];
$menu_arr[$i][$maxLevelNum]=$menuRow[$menuName];
//if(strlen($menuRow[helpPageBookmark]) > 0){
// $menu_arr[$i][$maxLevelNum + 1]=$menuRow[helpPagePath].'#'.$menuRow[helpPageBookmark];
//}else{
$menu_arr[$i][$maxLevelNum + 1]=$menuRow[httpLink];
//}
}
$topMenuName=$menu_arr[0][$maxLevelNum];
if($DEBUG){
echo "<br>menuRowsNum = $menuRowsNum";
echo "<br>-------------------------------------";
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
for($i=0;$i<$menuRowsNum;$i++){
echo "<br>>";
for($j=0;$j<$maxLevelNum;$j++){
if($menu_arr[$i][$j] > 0){
echo "{$menu_arr[$i][$j]}";
echo ".";
}
}
echo "-{$menu_arr[$i][$maxLevelNum]}";
echo "-{$menu_arr[$i][$maxLevelNum+1]}";
}
}
if($DEBUG) echo "<br>";
echo "\n\n foldersTree = gFld(\"<i>Menus</i>\", \"\")";
for($i=0 ; $i < sizeof($menu_arr); $i++){ //<2F><><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD> ---> <20><>
$isShowed = 0;
for($j=0;$j < $maxLevelNum; $j++){ //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---> <20><>
if($menu_arr[$i][$j] > 0 && $menu_arr[$i][$j+1] == 0 && $isShowed == 0){ //<2F>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
$menuName="{$menu_arr[$i][$j]}. {$menu_arr[$i][$maxLevelNum]}";
if(strlen($menu_arr[$i][$maxLevelNum + 1]) > 0){
$menuLink="../{$menu_arr[$i][$maxLevelNum + 1]} ";
}else{
$menuLink="../default.htm ";
}
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֦<EFBFBD><D6A6>ҳ<EFBFBD><D2B3><EFBFBD><EFBFBD>ڵ㣨<DAB5><E3A3A8>֦<EFBFBD><D6A6>Ҷ<EFBFBD>ӣ<EFBFBD><D3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵܽڵ<DCBD>
//if($menu_arr[$i+1][$j] > $menu_arr[$i][$j] ){
if($DEBUG) echo "<br>";
$parentId=$j;
$thisId=$j+1;
if($menu_arr[$i+1][$j+1] > 0){//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֦
if($j == 0){
echo "\n aux{$thisId} = insFld(foldersTree, gFld(\"$menuName\", \"$menuLink\"))";
}else{
echo "\n aux{$thisId} = insFld(aux{$parentId}, gFld(\"$menuName\", \"$menuLink\"))";
}
}else{ //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҷ<EFBFBD><D2B6>
echo "\n insDoc(aux{$parentId}, gLnk(\"R\", \"$menuName\", \"$menuLink\"))";
}
//}
$isShowed = 1;
} //end if($menu_arr[$i][$j+1] == 0)
} //end for($j=0;$j < $level_num;$j++)
}
?>

150
wxc2_omc/frame/leftMenu/ua.js Executable file
View File

@@ -0,0 +1,150 @@
/*
* $Log: ua.js,v $
* Revision 1.1.1.1 2003/08/27 12:32:00 cvsroot
* omcWeb_v5 project
*
* Revision 1.9 2002/07/22 14:06:21 bc6ix
* fix license path, change version reporting to use 2 digits for each level
*
* Revision 1.8 2002/07/07 08:23:07 bc6ix
* fix line endings
*
* Revision 1.7 2002/05/14 16:52:52 bc6ix
* use CVS Log for revision history
*
*
*/
/* ***** BEGIN LICENSE BLOCK *****
* Licensed under Version: MPL 1.1/GPL 2.0/LGPL 2.1
* Full Terms at http://bclary.com/lib/js/license/mpl-tri-license.txt
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Netscape code.
*
* The Initial Developer of the Original Code is
* Netscape Corporation.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Bob Clary <bclary@netscape.com>
*
* ***** END LICENSE BLOCK ***** */
function xbDetectBrowser()
{
var oldOnError = window.onerror;
var element = null;
window.onerror = null;
// work around bug in xpcdom Mozilla 0.9.1
window.saveNavigator = window.navigator;
navigator.OS = '';
navigator.version = parseFloat(navigator.appVersion);
navigator.org = '';
navigator.family = '';
var platform;
if (typeof(window.navigator.platform) != 'undefined')
{
platform = window.navigator.platform.toLowerCase();
if (platform.indexOf('win') != -1)
navigator.OS = 'win';
else if (platform.indexOf('mac') != -1)
navigator.OS = 'mac';
else if (platform.indexOf('unix') != -1 || platform.indexOf('linux') != -1 || platform.indexOf('sun') != -1)
navigator.OS = 'nix';
}
var i = 0;
var ua = window.navigator.userAgent.toLowerCase();
if (ua.indexOf('safari') != -1)
{
i = ua.indexOf('safari');
navigator.family = 'safari';
navigator.org = 'safari';
navigator.version = parseFloat('0' + ua.substr(i+7), 10);
}
else if (ua.indexOf('opera') != -1)
{
i = ua.indexOf('opera');
navigator.family = 'opera';
navigator.org = 'opera';
navigator.version = parseFloat('0' + ua.substr(i+6), 10);
}
else if ((i = ua.indexOf('msie')) != -1)
{
navigator.org = 'microsoft';
navigator.version = parseFloat('0' + ua.substr(i+5), 10);
if (navigator.version < 4)
navigator.family = 'ie3';
else
navigator.family = 'ie4'
}
else if (ua.indexOf('gecko') != -1)
{
navigator.family = 'gecko';
var rvStart = ua.indexOf('rv:');
var rvEnd = ua.indexOf(')', rvStart);
var rv = ua.substring(rvStart+3, rvEnd);
var rvParts = rv.split('.');
var rvValue = 0;
var exp = 1;
for (var i = 0; i < rvParts.length; i++)
{
var val = parseInt(rvParts[i]);
rvValue += val / exp;
exp *= 100;
}
navigator.version = rvValue;
if (ua.indexOf('netscape') != -1)
navigator.org = 'netscape';
else if (ua.indexOf('compuserve') != -1)
navigator.org = 'compuserve';
else
navigator.org = 'mozilla';
}
else if ((ua.indexOf('mozilla') !=-1) && (ua.indexOf('spoofer')==-1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('opera')==-1)&& (ua.indexOf('webtv')==-1) && (ua.indexOf('hotjava')==-1))
{
var is_major = parseFloat(navigator.appVersion);
if (is_major < 4)
navigator.version = is_major;
else
{
i = ua.lastIndexOf('/')
navigator.version = parseFloat('0' + ua.substr(i+1), 10);
}
navigator.org = 'netscape';
navigator.family = 'nn' + parseInt(navigator.appVersion);
}
else if ((i = ua.indexOf('aol')) != -1 )
{
// aol
navigator.family = 'aol';
navigator.org = 'aol';
navigator.version = parseFloat('0' + ua.substr(i+4), 10);
}
else if ((i = ua.indexOf('hotjava')) != -1 )
{
// hotjava
navigator.family = 'hotjava';
navigator.org = 'sun';
navigator.version = parseFloat(navigator.appVersion);
}
window.onerror = oldOnError;
}
xbDetectBrowser();

View File

View File

@@ -0,0 +1,415 @@
<?php
/*********************************************************
<20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
<09><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾOMC<4D><43>Top menu
<09><><EFBFBD>ù<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: header.inc
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:
<09><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>
<09><><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>
<09><><EFBFBD>ߣ<EFBFBD>Cui Ticun
<EFBFBD>޸<EFBFBD>ע<EFBFBD>ͣ<EFBFBD>
NO.1
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ʱ<EFBFBD>
<EFBFBD>޸<EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
*********************************************************/
require("../../inc/header.inc");
$DEBUG=0;
$pubDb = 'OMC_PUB';
$menuTable='sysMenuConf';
$myPrivilege = $userInfo['privilege'];
$max_layer=5;
if($selectedLanguage == 'eng'){
$menuName = 'name_2';
$menuRemark = 'remark_2';
}else{
$menuName = 'name_1';
$menuRemark = 'remark_1';
}
global $OmcTypeNo;
//menuTypeNo level_1 level_2 level_3 level_4 level_5 name_1 name_2 link_1 link_2 privilege remark_1 remark_2
$menuSql = "SELECT level_1,$menuName,httpLink,$menuRemark
FROM $menuTable
WHERE menuTypeNo = '$OmcTypeNo' AND privilege <= '$myPrivilege' AND privilege >= '0'
AND level_2 = '0' AND level_3 = '0' AND level_4 = '0' AND level_5 = '0'
ORDER BY level_1
";
if($DEBUG)
echo "<br>menuSql = $menuSql";
//$menuResult = @mysqli_query($pubConn,$menuSql);
$menuResult = mysqli_query($pubConn,$menuSql);
echo mysqli_error($pubConn);
$menuRowsNum = mysqli_num_rows($menuResult);
?>
<style type="text/css">
<!--
body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt;BACKGROUND-IMAGE: url(../../images/background_top.gif);BACKGROUND-REPEAT: repeat-x;BACKGROUND-COLOR: #f0efef;OVERFLOW: hidden}
A:link {text-decoration: none; color: #000000}
A:visited {text-decoration: none; color: #000000}
A:hover {text-decoration: none; color: #FFFFFF}
-->
</style>
<base target="downMain">
<script LANGUAGE="JavaScript" type="text/javascript">
<!--
var nav=navigator.appName; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
var ver=navigator.appVersion;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>İ汾
var IE4,NS4;
var bV=parseInt(navigator.appVersion);
if (ver.indexOf("MSIE") != -1){
IE4=true;
NS4=false;
}else{
IE4=false;
NS4=true;
}
var DOM=(!document.layers && !document.all && bV>=4) ? true : false; // A hack to guess if the browser supports the DOM
var capable = (NS4 || IE4 || DOM) ? true : false;
var colorOfMClick = "#b5b5b5";
var colorGray = "#A5A5A5";
var colorBlack = "#000000";
var colorWhite = "#FFFFFF";
function defaultClick(){
updateAlarm();
if(IE4){
divColl = document.all.tags("DIV");
divColl(0).style.background =colorOfMClick;
}else if(NS4){
document.layers[0].style.background = colorOfMClick;
}
}
function beMOver(e)
{
if(e.style.background != colorOfMClick){
e.style.background=colorGray;
e.style.color=colorWhite;
}
}
function beMOut(e)
{
if(e.style.background != colorOfMClick){
e.style.background="";
e.style.color=colorBlack;
}
}
function beMClick(e)
{
if (!capable) return;
if (IE4) {
divColl = document.all.tags("DIV");
for (i=0; i<divColl.length; i++){
divColl(i).style.background ="";
divColl(i).style.color =colorBlack;
}
e.style.background=colorOfMClick;
} else if(NS4) {
for (i=0; i<document.layers.length; i++) {
whichID = document.layers[i];
whichID.style.background = colorWhite;
whichID.style.color = colorBlack;
}
whichID.style.background = colorOfMClick;
} else if(DOM) {
return;
}
}
document.write("<div id='EMS_TIP_WINDOW' style=\"z-index:1;display:none;position:absolute;border-color:#000000;border-style:solid;border-width:1px;\" ></div>");
function getEvent()
{
if(document.all)
return window.event;
func=getEvent.caller;
while(func!=null){
var arg0=func.arguments[0];
if(arg0)
{
if((arg0.constructor==Event || arg0.constructor ==MouseEvent) || (typeof(arg0)=="object" && arg0.preventDefault && arg0.stopPropagation))
return arg0;
}
func=func.caller;
}
return null;
}
var alarmNum1=0;
var alarmNum2=0;
var alarmNum3=0;
var alarmNum4=0;
var alarmNum5=0;
function showTipWindow(alarmlevel,tip)
{
if(tip.length == 0)
return;
var pos_x;
var pos_y;
var event=getEvent();
if (navigator.appName=='Microsoft Internet Explorer')
{
pos_x=event.x;
pos_y=event.y+document.body.scrollTop;
}
else if (navigator.appName=='Netscape')
{
pos_x=event.pageX;
pos_y=event.pageY;
}
document.getElementById("EMS_TIP_WINDOW").style.top=pos_y;
document.getElementById("EMS_TIP_WINDOW").style.left=pos_x-80;
document.getElementById("EMS_TIP_WINDOW").style.backgroundColor='#eeeeee';
document.getElementById("EMS_TIP_WINDOW").style.display='';
if(alarmlevel == 1)
document.getElementById("EMS_TIP_WINDOW").innerHTML="Critical: "+alarmNum1;
else if(alarmlevel == 2)
document.getElementById("EMS_TIP_WINDOW").innerHTML="Major: "+alarmNum2;
else if(alarmlevel == 3)
document.getElementById("EMS_TIP_WINDOW").innerHTML="Minor: "+alarmNum3;
else if(alarmlevel == 4)
document.getElementById("EMS_TIP_WINDOW").innerHTML="Warning: "+alarmNum4;
else if(alarmlevel == 5)
document.getElementById("EMS_TIP_WINDOW").innerHTML="Indeterminate: "+alarmNum5;
}
function hideTipWindow()
{
document.getElementById("EMS_TIP_WINDOW").style.display='none';
}
function updateAlarm()
{
var fixurl="./updateAlarm.php";
var browserr = navigator.appName;
if(browserr == "Microsoft Internet Explorer")
{
request_oo = new ActiveXObject("Microsoft.XMLHTTP");
}
else
{
request_oo = new XMLHttpRequest();
}
request_oo.open("GET",fixurl,"false");
request_oo.onreadystatechange=function()
{
checkAlarmState();
}
request_oo.send(null);
setTimeout("updateAlarm()", 10000);
}
function checkAlarmState()
{
//not
if(request_oo.readyState == 3)
{
//alert("not finish");
}
if(request_oo.readyState == 4)
{
var response = request_oo.responseText;
//alert(response);
var alarmArr=response.split('_');
//critical
if(alarmArr[0] > 0)
{
document.getElementById('no_critical_alarm_id').style.display='none';
document.getElementById('critical_alarm_id').style.display='';
alarmNum1=alarmArr[0];
}
else
{
document.getElementById('no_critical_alarm_id').style.display='';
document.getElementById('critical_alarm_id').style.display='none';
}
//major
if(alarmArr[1] > 0)
{
document.getElementById('no_major_alarm_id').style.display='none';
document.getElementById('major_alarm_id').style.display='';
alarmNum2=alarmArr[1];
}
else
{
document.getElementById('no_major_alarm_id').style.display='';
document.getElementById('major_alarm_id').style.display='none';
}
//minor
if(alarmArr[2] > 0)
{
document.getElementById('no_minor_alarm_id').style.display='none';
document.getElementById('minor_alarm_id').style.display='';
alarmNum3=alarmArr[2];
}
else
{
document.getElementById('no_minor_alarm_id').style.display='';
document.getElementById('minor_alarm_id').style.display='none';
}
//warning
if(alarmArr[3] > 0)
{
document.getElementById('no_warn_alarm_id').style.display='none';
document.getElementById('warn_alarm_id').style.display='';
alarmNum4=alarmArr[3];
}
else
{
document.getElementById('no_warn_alarm_id').style.display='';
document.getElementById('warn_alarm_id').style.display='none';
}
//undefine
if(alarmArr[3] > 0)
{
document.getElementById('no_undefine_alarm_id').style.display='none';
document.getElementById('undefine_alarm_id').style.display='';
alarmNum5=alarmArr[4];
}
else
{
document.getElementById('no_undefine_alarm_id').style.display='';
document.getElementById('undefine_alarm_id').style.display='none';
}
}
}
-->
</script>
<!---->
<body onload="javascript:defaultClick();">
<?php
echo "<meta http-equiv=\"refresh\" content=\"600; url=$PHP_SELF\">";
?>
<table width="100%">
<tr>
<td width="153" valign="top" align="center" rowspan="2">
<img align="absbottom" border="0" src="../../images/alto_logo_40.gif" >
&nbsp;
</td>
<td valign="middle">
<table width=100 border="0" cellpadding="-1" cellspacing="-1" bordercolor="#FFFFFF" bordercolordark="#FFFFFF">
<tr>
<?php
$menuID=0;
if($selectedLanguage == 'chn'){
$keepLenght=12;
}else{
$keepLenght=14;
}
while($menuRow=mysqli_fetch_array($menuResult)){
$menuID++;
echo "<font color=\"#0000FF\" >";
echo "<td title=\"$menuRow[$menuRemark]\" align=\"center\">";
echo "<a href=\"../downIndex/downIndex.php?level_1=$menuRow[level_1]\">";
echo "<div height=21 bgcolor=\"#000000\" ID=\"menu_$menuID\" onClick=\"beMClick(this)\" ";
echo "onmouseover=\"javascript:beMOver(this)\" onmouseout=\"javascript:beMOut(this)\">";
echo "<b>";
$blankLen=ceil(($keepLenght - strlen($menuRow[$menuName])) / 2);
//echo "<br>blankLen=$blankLen";
$blankStr='';
for($i=0;$i<$blankLen/3;$i++){
$blankStr .= '&nbsp;';
}
echo "$blankStr$menuRow[$menuName]$blankStr";
echo "</b>";
echo "</div>";
echo "</a>";
echo "</td>";
echo "</font>";
}
?>
</tr>
</table>
</td>
<td align="right">
<a href="../../fault/alarmList/alarmList_index.php?selAlarmLevel=1&selSysTypeNo=all&noop=1" target="contents">
<span id="critical_alarm_id" style="display:none;">
<img id="critical_img_id" valign="middle" border="0" src="../../images/red_blink.gif" onMouseOver="javascript:showTipWindow('1','0');" onMouseOut="javascript:hideTipWindow();">
</span>
</a>
<span id="no_critical_alarm_id">
<img valign="middle" border="0" src="../../images/red_gray.gif">
</span>
<a href="../../fault/alarmList/alarmList_index.php?selAlarmLevel=2&selSysTypeNo=all&noop=1" target="contents">
<span id="major_alarm_id" style="display:none;">
<img id="major_img_id" valign="middle" border="0" src="../../images/orange_blink.gif" onMouseOver="javascript:showTipWindow('2','0');" onMouseOut="javascript:hideTipWindow();">
</span>
</a>
<span id="no_major_alarm_id">
<img valign="middle" border="0" src="../../images/orange_gray.gif">
</span>
<a href="../../fault/alarmList/alarmList_index.php?selAlarmLevel=3&selSysTypeNo=all&noop=1" target="contents">
<span id="minor_alarm_id" style="display:none;">
<img id="minor_img_id" valign="middle" border="0" src="../../images/yellow_blink.gif" onMouseOver="javascript:showTipWindow('3','0');" onMouseOut="javascript:hideTipWindow();">
</span>
</a>
<span id="no_minor_alarm_id">
<img valign="middle" border="0" src="../../images/yellow_gray.gif">
</span>
<a href="../../fault/alarmList/alarmList_index.php?selAlarmLevel=4&selSysTypeNo=all&noop=1" target="contents">
<span id="warn_alarm_id" style="display:none;">
<img id="warn_img_id" valign="middle" border="0" src="../../images/blue_blink.gif" onMouseOver="javascript:showTipWindow('4','0');" onMouseOut="javascript:hideTipWindow();">
</span>
</a>
<span id="no_warn_alarm_id">
<img valign="middle" border="0" src="../../images/blue_gray.gif">
</span>
<a href="../../fault/alarmList/alarmList_index.php?selAlarmLevel=5&selSysTypeNo=all&noop=1" target="contents">
<span id="undefine_alarm_id" style="display:none;">
<img id="undefine_img_id" valign="middle" border="0" src="../../images/lightblue_blink.gif" onMouseOver="javascript:showTipWindow('5','0');" onMouseOut="javascript:hideTipWindow();">
</span>
</a>
<span id="no_undefine_alarm_id">
<img valign="middle" border="0" src="../../images/lightblue_gray.gif">
</span>
&nbsp;&nbsp;
</td>
</tr>
<!-- a<tr>
<td ALIGN="right" valign="middle">
<a href="../../fault/alarmList/alarmList_index.php" ></a>
<IFRAME NAME="alarm_frame" frameborder="0" border="0" width="650" height="25" SRC="../../fault/alarmList/alarmNumList.php"></IFRAME>
</td>
</tr>-->
</table>
</body>
</html>

View File

@@ -0,0 +1,48 @@
<?php
require("../../inc/lib.inc");
//This script file is executed when login in the ems
//get the alarm number of the five alarm level
if (!session_id()) session_start();
if (isset($_SESSION["userInfo"])) {
if (!isset($userInfo)) $userInfo = $_SESSION["userInfo"];
$selectedLanguage = $userInfo['language'];
$language = $userInfo['language'];
$userName = $userInfo['ID'];
$userPwd = $userInfo['PWD'];
$userIp = $userInfo['IP'];
$session_id = session_id();
$login_time = date('Y-m-d H:i:s', $userInfo['refresh_time']);
}
$dbName = 'OMC_PUB';
$defTable = 'sysAlarmConf';
$logTable = 'sysAlarmLog';
$showSql = " SELECT t2.alarmLevel,count(*) as number
FROM $logTable as t1,$defTable as t2
WHERE t1.clearTime = '0000-00-00 00:00:00'
AND t1.sysTypeNo = t2.sysTypeNo
AND t1.compCode = t2.compCode
AND t1.alarmCode = t2.alarmCode
GROUP BY t2.alarmLevel
";
if (0) echo "<br>showSql=$showSql";
$result=@mysqli_query($pubConn,$showSql);
echo mysqli_error($pubConn);
global $alarmNumArr;
while ($rows = @mysqli_fetch_array($result)) {
$alarmNumArr[$rows['alarmLevel']]['number'] = $rows['number'];
}
//echo "alarmNumArr=$alarmNumArr<br>";
// echo "<pre>";
// echo print_r($alarmNumArr);
// echo "</pre>";
for ($i = 1; $i <= 5; $i++) {
if (trim($alarmNumArr[$i]['number']) == "")
$alarmNumArr[$i]['number'] = 0;
}
$retureValue = $alarmNumArr[1]['number'] . "_" . $alarmNumArr[2]['number'] . "_" . $alarmNumArr[3]['number'] . "_" . $alarmNumArr[4]['number'] . "_" . $alarmNumArr[5]['number'];
echo "$retureValue"; ///is should
?>