📄 tree.php
字号:
<?php
include_once( "inc/auth.php" );
echo "<head>\r\n<title></title>\r\n<!-- The xtree script file -->\r\n";
echo "<s";
echo "cript language=javascript src=\"xtree.js\"></script>\r\n";
echo "<S";
echo "CRIPT language=javascript src=\"/inc/common.js\"></SCRIPT>\r\n";
echo "<S";
echo "CRIPT language=javascript src=\"/inc/follow.js\"></SCRIPT>\r\n";
echo "<S";
echo "CRIPT language=javascript src=\"/inc/prototype.js\"></SCRIPT>\r\n<!-- Modify this file to change the way the tree looks -->\r\n<link type=\"text/css\" rel=\"stylesheet\" href=\"xtree.css\">\r\n ";
echo "<s";
echo "tyle>\r\n\tA:visited { COLOR: #000000; TEXT-DECORATION: none}\t\r\n\tinput { width: 120px; }\r\n\tBUTTON.btnss {\r\n\tBORDER-RIGHT: medium none; BORDER-TOP: medium none; PADDING-LEFT: 2px; FONT-SIZE: 8pt; BACKGROUND-IMAGE: url(/images/button_sort.png); PADDING-BOTTOM: 2px; MARGIN: 0px 0px 1px 2px; OVERFLOW: hidden; BORDER-LEFT: medium none; WIDTH: 49px; CURSOR: hand; COLOR: #000000; PADDING-TOP: 1px; BORDER-BO";
echo "TTOM: medium none; BACKGROUND-REPEAT: no-repeat; FONT-FAMILY: Verdana; HEIGHT: 20px; BACKGROUND-COLOR: transparent; TEXT-ALIGN: left\r\n}\r\n</style>\r\n</head>\r\n<!-- <base target=\"file_main\"> -->\r\n<body>\r\n<div style=\"position: absolute; top:26px; left: 1px; height:95%;width:100%; padding-top: 5px; overflow: auto; \">\r\n\r\n<!-- js file containing the tree content, edit this file to alter the menu,\r\n the me";
echo "nu will be inserted where this tag is located in the document -->\r\n";
include_once( "newtree.php" );
echo "</div>\r\n </div>\r\n<div style=\"position: absolute; left:88px; top: 26px;z-index=10;\">\r\n<table>\r\n<tr>\r\n<td>\r\n<IMG SRC=\"/images/icons/folder_add.png\" WIDTH=\"16\" HEIGHT=\"16\" BORDER=\"0\" ALT=\"添加文档夹\" onclick=\"addNode()\">\r\n</td>\r\n<td>\r\n<IMG SRC=\"/images/icons/folder_delete.png\" WIDTH=\"16\" HEIGHT=\"16\" BORDER=\"0\" ALT=\"删除文档夹\" onclick=\"delNode();\">\r\n</td>\r\n<td>\r\n<IMG SRC=\"/images/icons/folder_edit.png\" WIDTH=\"16\"";
echo " HEIGHT=\"16\" BORDER=\"0\" ALT=\"重命名\" onclick=\"changeName();\">\r\n</td>\r\n</tr>\r\n</table>\r\n</div> \r\n\r\n\r\n</body>\r\n ";
$query = "\r\n\t\t\tSELECT MAX(SORT_ID) FROM file_sort\r\n\t\t\t";
$rc = exequery( $connection, $query );
$row = mysql_fetch_array( $rc );
$max_sort_id = $row[0];
if ( $max_sort_id == "" )
{
$max_sort_id = 1;
}
echo "\r\n";
echo "<s";
echo "cript>\r\nfunction sendChangeName(par,par1,par3){\r\n\turl = \"do.php\";\r\n\tqueryString = 'SEND_DATA='+par+'&SORT_ID='+par1+'&f='+par3;\r\n\tnew Ajax.Request\r\n\t(\r\n\t\turl,\r\n\t\t{\r\n\t\t\tmethod: \"post\",\t\r\n\t\t\tonSuccess : function(resp)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//alert(resp.responseText)\r\n\t\t\t\t\t\t\t//alert(par1);\r\n\t\t\t\t\t\t\t//alert(par3);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t},\r\n\t\t\tonFailure : function()\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\talert(url);\r\n\t\t\t\t\t\t\t\r\n\t";
echo "\t\t\t\t\t},\r\n\t\t\tparameters : queryString\r\n\t\t}\r\n\t);\r\n\r\n}\r\nvar addnodeid =";
echo $max_sort_id;
echo ";\r\nfunction addNode() {\r\n\taddnodeid = addnodeid+1;\r\n\tif (tree.getSelected()) {\r\n\t\ttree.getSelected().add(new WebFXTreeItem('新建文档','../folder.php?SORT_ID='+addnodeid+''));\r\n\t\ttree.getSelected().expand();\r\n\t\tthisid =tree.getSelected().id+\"-anchor\";\r\n\t\tvar sortidstring = document.getElementById(thisid).href;//从字符中截取ID\r\n\t\tstag=sortidstring.lastIndexOf('=');\r\n\t\tvar parentid = sortidstring.sub";
echo "string(stag+1)\r\n\t\tsendChangeName(addnodeid,parentid,'addnode');\r\n\t}else{alert(\"请选择结点!\");}\t\t\r\n}\r\n\r\n/*function addNodes() {\r\n\tif (tree.getSelected()) {\r\n\t\tvar foo = tree.getSelected().add(new WebFXTreeItem('New'));\r\n\t\tvar bar = foo.add(new WebFXTreeItem('Sub 1'));\r\n\t\tvar fbr = foo.add(new WebFXTreeItem('Sub 2'));\r\n\t}\r\n} */\r\n\r\nfunction delNode() {\r\n\talert(tree.getSelected().id);\r\n\tif (tree.getS";
echo "elected()) {\r\n\t\tif(!window.confirm('是否删除?')){return false;}\r\n\t\tthisid =tree.getSelected().id+\"-anchor\";\r\n\t\tvar sortidstring = document.getElementById(thisid).href;//从字符中截取ID\r\n\t\tstag=sortidstring.lastIndexOf('=');\r\n\t\trstr=sortidstring.substring(stag+1);\r\n\t\tsendChangeName('',rstr,'remove');\r\n\t\t//alert(rstr);\r\n\t\ttree.getSelected().remove();\r\n\twindow.parent.file_main.location.href='../folde";
echo "r.php?FILE_SORT=1&SORT_ID=0';\r\n\t}else{alert(\"请选择结点!\");}\t\r\n}\r\n\r\nfunction LoadWindow(titleName,nodeid)\r\n\t{\r\n\t URL='change_name.php?nowname='+titleName+'&nodeid='+nodeid;\r\n\t loc_x=document.body.scrollLeft+event.clientX-event.offsetX+100;\r\n\t loc_y=document.body.scrollTop+event.clientY-event.offsetY+170;\r\n\t window.showModalDialog(URL,self,\"edge:raised;scroll:1;status:0;help:0;resizable:1;dial";
echo "ogWidth:286px;dialogHeight:142px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n\t}\r\n\r\nfunction changeName(){\r\n\t\r\n\tif(tree.getSelected()==null){\r\n\talert('请选择接点操作!');\r\n\t}else{\r\n\t\tLoadWindow(tree.getSelected().text,tree.getSelected().id);\r\n\t\tthisid =tree.getSelected().id+\"-anchor\";\r\n\t\tvar changename = document.getElementById(\"nodeName\").value;\r\n\t\tif(changename!=''){\r\n\t\tdocument.getElementBy";
echo "Id(thisid).innerText=changename;\r\n\t\tvar sortidstring = document.getElementById(thisid).href;//从字符中截取ID\r\n\t\tstag=sortidstring.lastIndexOf('=');\r\n\t\trstr=sortidstring.substring(stag+1);\r\n\t\tsendChangeName(changename,rstr,'changename');\r\n\t\t}\r\n\t}\r\n\t//alert(document.getElementById(tree.getSelected().id).innerHTML);\r\n}\r\n</script>\r\n<input type=\"hidden\" name=\"nodeName\" id=\"nodeName\" value=\"\">\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -