⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menu.php

📁 通达网络办公 - Office Anywhere 2008 增强版100%源码(3.4.081216) 内含 通达OA2008增強版接近完美破解补丁20081216集 及 最新通达OA2008ADV(
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
$MENU_LEFT = array( );
$target = "address_main";
$linkman_out = "";
$linkman_out = "<table class=\"TableBlock trHover\" width=\"100%\" align=\"center\">\r\n   <tr class=\"TableData\" align=\"center\">\r\n     <td nowrap onclick=\"parent.".$target.".location='address?GROUP_ID=0&PUBLIC_FLAG=0'\" style=\"cursor:pointer;\">默认</td>\r\n   </tr>";
$query = "select * from ADDRESS_GROUP where USER_ID='".$LOGIN_USER_ID."' or  (USER_ID='' and (find_in_set('{$LOGIN_USER_ID}',PRIV_USER) or PRIV_DEPT='ALL_DEPT' or find_in_set('{$LOGIN_DEPT_ID}',PRIV_DEPT) or find_in_set('{$LOGIN_USER_PRIV}',PRIV_ROLE)))  order by USER_ID desc,ORDER_NO asc,GROUP_NAME asc";
$cursor = exequery( $connection, $query );
$GROUP_COUNT = 1;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
	++$GROUP_COUNT;
	$USER_ID = $ROW['USER_ID'];
	$PRIV_USER = $ROW['PRIV_USER'];
	$GROUP_ID = $ROW['GROUP_ID'];
	$GROUP_NAME = $ROW['GROUP_NAME'];
	$PRIV_DEPT = $ROW['PRIV_DEPT'];
	$PRIV_ROLE = $ROW['PRIV_ROLE'];
	$linkman_out .= "<tr class=\"TableData\" align=\"center\">";
	if ( $USER_ID == "" && ( find_id( $PRIV_USER, $LOGIN_USER_ID ) || ( $PRIV_DEPT = "ALL_DEPT" ) || find_id( $LOGIN_DEPT_ID, $PRIV_DEPT ) || find_id( $LOGIN_USER_PRIV, $PRIV_ROLE ) ) )
	{
		$linkman_out .= "<td nowrap onclick=\"parent.".$target.".location='address?GROUP_ID=".$GROUP_ID."&PUBLIC_FLAG=1'\" style=\"cursor:pointer;\">".$GROUP_NAME." (公共)</td>";
	}
	else
	{
		$linkman_out .= "<td nowrap onclick=\"parent.".$target.".location='address?GROUP_ID=".$GROUP_ID."&PUBLIC_FLAG=0'\" style=\"cursor:pointer;\">".$GROUP_NAME."</td>";
	}
	$linkman_out .= "</tr>";
}
$linkman_out .= "</table>";
$module_style = "display:;";
$MENU_LEFT[count( $MENU_LEFT )] = array(
	"text" => "联系人分组",
	"href" => "",
	"onclick" => "clickMenu",
	"target" => $target,
	"title" => "",
	"img" => "",
	"module" => $linkman_out,
	"module_style" => $module_style
);
$linkman_out = "";
$linkman_out = "<table class=\"TableBlock trHover\" width=\"100%\" align=\"center\">";
include_once( "inc/mb.php" );
$i = ord( "A" );
for ( ;	$i <= ord( "Z" );	++$i	)
{
	$name[chr( $i )] = array( );
	$nidx[chr( $i )] = array( );
}
$name['other'] = array( );
$nidx['other'] = array( );
$sql = "select * from ADDRESS where USER_ID='".$LOGIN_USER_ID."' order by PSN_NAME";
$result = mysql_query( $sql );
while ( $row = mysql_fetch_array( $result ) )
{
	$s = $row['PSN_NAME'];
	$idx = "other";
	if ( 128 <= ord( $s[0] ) )
	{
		$FirstName = substr( $s, 0, 2 );
		foreach ( $mb as $key => $s )
		{
			if ( !strpos( $s, $FirstName ) )
			{
				continue;
			}
			$idx = strtoupper( $key );
			break;
		}
	}
	else
	{
		$FirstName = strtoupper( $s[0] );
		if ( "A" <= $FirstName && $FirstName <= "Z" )
		{
			$idx = $FirstName;
		}
		else
		{
			$idx = "other";
		}
	}
	if ( !in_array( $FirstName, $nidx[$idx] ) )
	{
		array_push( &$nidx[$idx], $FirstName );
	}
	array_push( &$name[$idx], $row );
}
$INDEX = 0;
if ( mysql_num_rows( $result ) < 1 )
{
	$linkman_out .= "<tr class=\"TableData\" align=\"center\"><td nowrap >无记录</td></tr>";
}
else
{
	foreach ( $name as $key => $r )
	{
		if ( 0 < count( $name[$key] ) )
		{
			++$INDEX;
			if ( $key == "other" )
			{
				$TABLE_STR = "<b>其它</b>(".count( $name[$key] ).") - ".implode( ", ", $nidx[$key] );
			}
			else
			{
				$TABLE_STR = "<b>".$key."</b>(".count( $name[$key] ).") - ".implode( ", ", $nidx[$key] );
			}
			$ID_STR = "";
			foreach ( $r as $ROW )
			{
				$ADD_ID = $ROW['ADD_ID'];
				$ID_STR .= $ADD_ID.",";
			}
			$linkman_out .= "<tr class=\"TableData\" align=\"left\"><td onclick=\"parent.".$target.".location='address/idx_search.php?ID_STR=".$ID_STR."&TABLE_STR=".$TABLE_STR."'\" style=\"cursor:pointer;\">".$TABLE_STR."</td></tr>";
		}
	}
}
$linkman_out .= "</table>";
$module_style = "display:none;";
$MENU_LEFT[count( $MENU_LEFT )] = array(
	"text" => "索引(按姓氏)",
	"href" => "",
	"onclick" => "clickMenu",
	"target" => $target,
	"title" => "",
	"img" => "",
	"module" => $linkman_out,
	"module_style" => $module_style
);
$MENU_LEFT[count( $MENU_LEFT )] = array(
	"text" => "查找(关键字)",
	"href" => "address/search.php",
	"onclick" => "",
	"target" => $target,
	"title" => "",
	"img" => "",
	"module" => "",
	"module_style" => ""
);
$MENU_LEFT[count( $MENU_LEFT )] = array(
	"text" => "管理分组",
	"href" => "group",
	"onclick" => "",
	"target" => $target,
	"title" => "",
	"img" => "",
	"module" => "",
	"module_style" => ""
);
include_once( "inc/menu_left.php" );
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -