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

📄 menu.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
$COLOR1 = "#d6d6d6";
$COLOR2 = "#F5F5F5";
$COLOR3 = "#d6d6d6";
echo "\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n</head>\r\n\r\n<body topmargin=\"0\" leftmargin=\"0\" class=\"TableLine1\">\r\n<!---------------------- 分组 -------------------------------->\r\n<table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\" cellpadding=\"3\"  >\r\n<tr class=\"TableHeader\" onclick=\"clickMenu('menu_1')\" style=\"cursor:hand\">\r\n<td nowrap colspan=\"5\"  title=\"\"";
echo "><b>联系人分组</b></td>\r\n</tr>\r\n</table>\r\n<table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\"  cellpadding=\"5\" id=\"menu_1\" style=\"display:\">\r\n<tr class=\"TableLine2\">\r\n<td nowrap width=\"100%\" id=\"group_1\" onclick=\"view_group(this,0,1)\"  style=\"cursor:hand\">默认</td>\r\n</tr>\r\n";
$connection = openconnection( );
$query = "select * from ADDRESS_GROUP where USER_ID='{$LOGIN_USER_ID}' order by GROUP_NAME asc";
$cursor = exequery( $connection, $query );
$GROUP_COUNT = 1;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
	++$GROUP_COUNT;
	$GROUP_ID = $ROW['GROUP_ID'];
	$GROUP_NAME = $ROW['GROUP_NAME'];
	echo "<tr class=\"TableLine1\">\r\n<td nowrap width=\"100%\" id=\"group_";
	echo $GROUP_COUNT;
	echo "\" onclick=\"view_group(this,";
	echo $GROUP_ID;
	echo ",";
	echo $GROUP_COUNT;
	echo ")\" style=\"cursor:hand\">";
	echo $GROUP_NAME;
	echo "</td>\r\n</tr>\r\n";
}
echo "</table>\r\n";
echo "<s";
echo "cript language=\"JavaScript\">\r\nvar td_id=1;\r\n\r\nfunction setGroupPointer(theRow, thePointerColor,td_id_over)\r\n{\r\n  if(td_id!=td_id_over)\r\n     theRow.bgColor = thePointerColor;\r\n}\r\nfunction clickMenu(ID)\r\n{\r\n    targetelement=document.all(ID);\r\n    if (targetelement.style.display==\"none\")\r\n        targetelement.style.display='';\r\n    else\r\n        targetelement.style.display=\"none\";\r\n}\r\n\r\nfunction v";
echo "iew_group(theRow,group_id,group_count)\r\n{\r\n   parent.main.location=\"address?GROUP_ID=\"+group_id;\r\n   td_id=group_count;\r\n";
$I = 1;
for ( ;	$I <= $GROUP_COUNT;	++$I	)
{
	echo "     group_".$I.".bgColor='{$COLOR2}';\n";
}
echo "     theRow.bgColor='";
echo $COLOR1;
echo "';\r\n}\r\n</script>\r\n\r\n<!---------------------- 索引 -------------------------------->\r\n<table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\"  cellpadding=\"5\"  >\r\n<tr class=\"TableHeader\" onclick=\"clickMenu('menu_2')\" style=\"cursor:hand\">\r\n<td nowrap colspan=\"5\"  ><b>索引(按姓氏)</b></td>\r\n</tr>\r\n</table>\r\n<table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\"  cellpadding=\"5\" id=\"menu_2\" style=\"dis";
echo "play:none\">\r\n";
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 ) )
			{
				$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 )
{
	echo "<tr class=\"TableLine1\"  >\r\n<td nowrap width=\"100%\" id=\"index_1\"  style=\"cursor:hand\">无记录</td>\r\n</tr>\r\n";
}
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.",";
			}
			echo "<tr class=\"TableLine1\"  >\r\n<td width=\"100%\" id=\"index_";
			echo $INDEX;
			echo "\" onclick=\"view_index(this,'";
			echo $ID_STR;
			echo "','";
			echo $TABLE_STR;
			echo "',";
			echo $INDEX;
			echo ")\" style=\"cursor:hand\">";
			echo $TABLE_STR;
			echo "</td>\r\n</tr>\r\n";
		}
	}
}
echo "</table>\r\n\r\n";
echo "<s";
echo "cript language=\"JavaScript\">\r\nvar index_id=0;\r\n\r\nfunction setIndexPointer(theRow, thePointerColor,index_id_over)\r\n{\r\n  if(index_id!=index_id_over)\r\n     theRow.bgColor = thePointerColor;\r\n}\r\n\r\nfunction view_index(theRow,id_str,table_str,index_count)\r\n{\r\n   parent.main.location=\"address/idx_search.php?ID_STR=\"+id_str+\"&TABLE_STR=\"+table_str;\r\n   index_id=index_count;\r\n";
$I = 1;
for ( ;	$I <= $INDEX;	++$I	)
{
	echo "     index_".$I.".bgColor='{$COLOR2}';\n";
}
echo "     theRow.bgColor='";
echo $COLOR1;
echo "';\r\n}\r\n</script>\r\n\r\n<!---------------------- 查找 -------------------------------->\r\n<table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\" cellpadding=\"5\"  >\r\n<tr class=\"TableHeader\" onclick=\"parent.main.location='address/search.php'\" style=\"cursor:hand\">\r\n<td nowrap colspan=\"5\"  ><b>查找(关键字)</b></td>\r\n</tr>\r\n</table>\r\n\r\n<!---------------------- 管理分组 -------------------------------->\r\n<table bo";
echo "rder=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\" cellpadding=\"5\"  >\r\n<tr class=\"TableHeader\" onclick=\"parent.main.location='group'\" style=\"cursor:hand\">\r\n<td nowrap colspan=\"5\"  ><b>管理分组</b></td>\r\n</tr>\r\n</table>\r\n\r\n</body>\r\n</html>";
?>

⌨️ 快捷键说明

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