📄 index.php
字号:
<?php
ob_start( );
include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
ob_end_clean( );
$pararr = explodestpar( $par );
$rooturl_fix = "?";
$depturl_fix = "?";
$userurl_fix = "?";
if ( 0 < strpos( $pararr['root_url'], "?" ) )
{
$rooturl_fix = "&";
}
if ( 0 < strpos( $pararr['dept_url'], "?" ) )
{
$depturl_fix = "&";
}
if ( 0 < strpos( $pararr['user_url'], "?" ) )
{
$userurl_fix = "&";
}
echo "<link rel=\"stylesheet\" href=\"/images/xloadtree/xtree.css\" type=\"text/css\">\r\n";
echo "<s";
echo "tyle>\r\na:link \t\t{color: #0000FF; text-decoration: none;}\r\na:visited \t{color: #0000FF; text-decoration: none;}\r\na:hover \t{color: #FF0000; text-decoration: none;} \r\na:active \t{color: #FF0000; text-decoration: none;}\r\n</style>\r\n";
echo "<s";
echo "cript type=\"text/javascript\" src=\"/inc/xloadtree/xtree.js\"></script>\r\n";
echo "<s";
echo "cript type=\"text/javascript\" src=\"/inc/xloadtree/xmlextras.js\"></script>\r\n";
echo "<s";
echo "cript type=\"text/javascript\" src=\"/inc/xloadtree/xloadtree.js\"></script>\r\n\r\n";
$query = "SELECT * FROM UNIT";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$companyname = $ROW['UNIT_NAME'];
}
echo "\r\n<div style=\"padding-left:10px\">\r\n";
echo "<s";
echo "cript type=\"text/javascript\">\r\n\r\nwebFXTreeConfig.rootIcon\t\t= \"/images/xloadtree/company.gif\";\r\nwebFXTreeConfig.openRootIcon\t= \"/images/xloadtree/company.gif\";\r\nwebFXTreeConfig.folderIcon\t\t= \"/images/xloadtree/t_ini.gif\";\r\nwebFXTreeConfig.openFolderIcon\t= \"/images/xloadtree/t_ini.gif\";\r\nwebFXTreeConfig.fileIcon\t\t= \"/images/xloadtree/t_ini.gif\";\r\nwebFXTreeConfig.lMinusIcon\t\t= \"/images/xloadtree/Lmin";
echo "us.png\";\r\nwebFXTreeConfig.lPlusIcon\t\t= \"/images/xloadtree/Lplus.png\";\r\nwebFXTreeConfig.tMinusIcon\t\t= \"/images/xloadtree/Tminus.png\";\r\nwebFXTreeConfig.tPlusIcon\t\t= \"/images/xloadtree/Tplus.png\";\r\nwebFXTreeConfig.iIcon\t\t\t= \"/images/xloadtree/I.png\";\r\nwebFXTreeConfig.lIcon\t\t\t= \"/images/xloadtree/L.png\";\r\nwebFXTreeConfig.tIcon\t\t\t= \"/images/xloadtree/T.png\";\r\n\r\nwebFXTreeConfig.blankIcon\t\t= \"/images/xlo";
echo "adtree/blank.png\";\r\n\r\n\r\nvar rti;\r\n";
if ( $pararr['root_url'] != "" && $pararr['select_module'] == 1 )
{
$strget = $rooturl_fix."par=".$par;
}
echo "var tree = new WebFXTree(\"";
echo $companyname;
echo "\",\"";
echo $pararr['root_url'];
echo $strget;
echo "\");\r\n";
$sql = "SELECT * FROM department WHERE DEPT_PARENT=0 ORDER BY DEPT_NO ASC";
$rs = exequery( $connection, $sql );
while ( $row = mysql_fetch_array( $rs ) )
{
$deptid = $row['DEPT_ID'];
$deptname = $row['DEPT_NAME'];
$display = 1;
if ( $pararr['priv_view'] && $LOGIN_USER_PRIV != 1 )
{
$display = is_dept_priv( $deptid );
}
unset( $cntc );
unset( $cntu );
$sqlc = "SELECT COUNT(*) AS cnt FROM department WHERE DEPT_PARENT='".$deptid."'";
$rsc = exequery( $connection, $sqlc );
$rowc = mysql_fetch_array( $rsc );
$cntc = $rowc['cnt'];
if ( $pararr['view_type'] == 0 )
{
$sqlu = "SELECT COUNT(*) AS cnt FROM user WHERE DEPT_ID='".$deptid."'";
$rsu = exequery( $connection, $sqlu );
$rowu = mysql_fetch_array( $rsu );
$cntu = $rowu['cnt'];
}
if ( !$display )
{
$cntu = 0;
}
$pararr['deptid'] = $deptid;
$par = implodestpar( $pararr );
$cnt = $cntc + $cntu;
if ( $pararr['select_module'] )
{
$action = $pararr['dept_url'].$depturl_fix."par=".$par;
}
else
{
$action = $pararr['dept_url'].$depturl_fix."DEPT_ID=".$deptid;
}
if ( $pararr['dept_url'] == "" )
{
$action = "";
}
if ( 0 < $cnt )
{
echo "tree.add(new WebFXLoadTreeItem(\"";
echo $deptname;
echo "\", \"/inc/dept_user_list/dept_xml.php?par=";
echo $par;
echo "\",\"";
echo $action;
echo "\"));\r\n";
}
else
{
echo "tree.add(new WebFXTreeItem(\"";
echo $deptname;
echo "\",\"";
echo $action;
echo "\",\"\",\"/images/xloadtree/t_ini.gif\"));\r\n\t\r\n\t\t";
}
}
echo "\r\n\r\n\r\ndocument.write(tree);\r\n\r\n</script>\r\n</div>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -