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

📄 index.php

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

include_once( "inc/auth.php" );
include_once( "inc/function_page_01.php" );
include_once( "inc/utility_all.php" );
if ( $_REQUEST['cur_page'] == "" )
{
	$cur_page = 1;
}
else
{
	$cur_page = $_REQUEST['cur_page'];
}
echo "<html>\r\n<head>\r\n<title>通讯簿</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n";
echo "<s";
echo "cript>\r\nfunction delete_select()\r\n{\r\n  delete_str=\"\";\r\n  for(i=0;i<document.all(\"id_select\").length;i++)\r\n  {\r\n      el=document.all(\"id_select\").item(i);\r\n      if(el.checked)\r\n      {  val=el.value;\r\n         delete_str+=val + \",\";\r\n      }\r\n  }\r\n  \r\n  if(i==0)\r\n  {\r\n      el=document.all(\"id_select\");\r\n      if(el.checked)\r\n      {  val=el.value;\r\n         delete_str+=val + \",\";\r\n      }\r\n  }\r\n\r";
echo "\n  if(delete_str==\"\")\r\n  {\r\n     alert(\"请至少选择其中一条记录!\");\r\n     return;\r\n  }\r\n\r\n  msg='确认要删除所选记录么?';\r\n  if(window.confirm(msg))\r\n  {\r\n    url=\"do.php?id_str=\"+ delete_str +\"&f=del_s&order=";
echo $_REQUEST['order'];
echo "&sens=";
echo $_REQUEST['sens'];
echo "&cur_page=";
echo $cur_page;
echo "&GROUP_ID=";
echo $GROUP_ID;
echo "\";\r\n\tlocation=url;\r\n  }\r\n}\r\n\r\nfunction check_all()\r\n{\r\n for (i=0;i<document.all(\"id_select\").length;i++)\r\n {\r\n   if(document.all(\"allbox\").checked)\r\n      document.all(\"id_select\").item(i).checked=true;\r\n   else\r\n      document.all(\"id_select\").item(i).checked=false;\r\n }\r\n \r\n if(i==0)\r\n {\r\n   if(document.all(\"allbox\").checked)\r\n      document.all(\"id_select\").checked=true;\r\n   else\r\n      document.";
echo "all(\"id_select\").checked=false;\r\n }\r\n}\r\n\r\nfunction add_detail(ADD_ID)\r\n{\r\n URL=\"add_detail.php?ADD_ID=\"+ADD_ID;\r\n myleft=(screen.availWidth-500)/2;\r\n window.open(URL,\"detail\",\"height=500,width=400,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left=\"+myleft+\",resizable=yes\");\r\n}\r\n\r\nfunction delete_add(ADD_ID)\r\n{\r\n msg='确认要删除该联系人么?';\r\n if(window.confirm(msg))\r\n {\r\n  UR";
echo "L=\"delete.php?ADD_ID=\"+ADD_ID+\"&order=";
echo $_REQUEST['order'];
echo "&sens=";
echo $_REQUEST['sens'];
echo "&cur_page=";
echo $cur_page;
echo "&GROUP_ID=";
echo $GROUP_ID;
echo "\";\r\n  window.location=URL;\r\n }\r\n}\r\n\r\n</script>\r\n</head>\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n";
$connection = openconnection( );
if ( !( $GROUP_IDs = $_REQUEST['GROUP_ID'] ) )
{
	$GROUP_IDs = 0;
}
else
{
	$GROUP_IDs = $_REQUEST['GROUP_ID'];
}
$querys = "select GROUP_NAME from address_group where GROUP_ID=".$GROUP_IDs;
$cursors = exequery( $connection, $querys );
if ( $rows = mysql_fetch_row( $cursors ) )
{
	$GROUP_NAMEs = $rows[0];
}
if ( !$GROUP_NAMEs )
{
	$GROUP_NAMEs = "默认";
}
$query = "SELECT * from ADDRESS_GROUP where GROUP_ID='{$GROUP_ID}'";
$cursor = exequery( $connection, $query );
echo $ADD_MODIFIED;
if ( $ROW = mysql_fetch_array( $cursor ) )
{
	$GROUP_NAME = $ROW['GROUP_NAME'];
}
if ( $GROUP_ID == 0 )
{
	$GROUP_NAME = "默认";
}
echo "<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"0\">\r\n  <tr class=\"tablehead1\">\r\n    <td><img src=\"/images/menu/address.gif\" align=\"absmiddle\"> 个人通讯薄(\r\n      ";
echo $GROUP_NAME;
echo "      ) </td>\r\n  </tr>\r\n  <tr class=\"tablehead2\">\r\n    <td><input type=\"image\" src=\"/images/button/newlinkman.gif\"  onClick=\"location='new.php?GROUP_ID=";
echo $GROUP_ID;
echo "';\" title=\"在“";
echo $GROUP_NAME;
echo "”分组中创建新的联系人,录入相关信息\">\r\n      <a href=\"search.php\"><img src=\"/images/button/search.gif\" border=\"0\"></a> <a href=\"../group\"><img src=\"/images/button/managegroup.gif\" border=\"0\"></a> </td>\r\n  </tr>\r\n</table>\r\n<br>\r\n";
include( "../address.inc" );
$query = "SELECT * from ADDRESS where USER_ID='{$LOGIN_USER_ID}' and GROUP_ID='{$GROUP_ID}'";
switch ( $_REQUEST['order'] )
{
case "name" :
	$query .= " ORDER BY PSN_NAME";
	break;
case "gender" :
	$query .= " ORDER BY SEX";
	break;
case "comtel" :
	$query .= " ORDER BY TEL_NO_DEPT";
	break;
case "homtel" :
	$query .= " ORDER BY TEL_NO_HOME";
	break;
case "mobile" :
	$query .= " ORDER BY MOBIL_NO";
	break;
case "email" :
	$query .= " ORDER BY EMAIL";
	break;
case "seqnumber" :
	$query .= " ORDER BY SEQNUMBER";
	break;
default :
	$query .= " ORDER BY SEQNUMBER";
	break;
}
$query .= $_REQUEST['sens'] ? " ASC" : " DESC";
$query = page( $query, 10 );
$cursor = exequery( $connection, $query );
$ADD_COUNT = 0;
$LINE_COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
	++$ADD_COUNT;
	++$LINE_COUNT;
	$ADD_ID = $ROW['ADD_ID'];
	$SEQNUMBER = $ROW['SEQNUMBER'];
	$PSN_NAME = $ROW['PSN_NAME'];
	$SEX = $ROW['SEX'];
	$TEL_NO_DEPT = $ROW['TEL_NO_DEPT'];
	$TEL_NO_HOME = $ROW['TEL_NO_HOME'];
	$MOBIL_NO = $ROW['MOBIL_NO'];
	$EMAIL = $ROW['EMAIL'];
	switch ( $SEX )
	{
	case "0" :
		$SEX = "男";
		break;
	case "1" :
		$SEX = "女";
	}
	if ( $ADD_COUNT == 1 )
	{
		echo "<table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\"  cellpadding=\"5\">\r\n  ";
	}
	if ( $ADD_COUNT % 2 == 1 )
	{
		$TableLine = "TableLine1";
	}
	else
	{
		$TableLine = "TableLine2";
	}
	echo "  <tr class=\"";
	echo $TableLine;
	echo "\">\r\n    <td nowrap  >";
	echo "<s";
	echo "pan style=\"color:#46A718\">\r\n      <input type=\"checkbox\" name=\"id_select\" value=\"";
	echo $ADD_ID;
	echo "\" onClick=\"check_one(self);\">\r\n      </span></td>\r\n    <td nowrap  >";
	echo $SEQNUMBER;
	echo "</td>\r\n    <td nowrap  ><a href=\"javascript:add_detail('";
	echo $ADD_ID;
	echo "');\">\r\n      ";
	echo $PSN_NAME;
	echo "    </a></td>\r\n    <td nowrap  >";
	echo $SEX;
	echo "</td>\r\n    <td nowrap  >";
	echo $TEL_NO_DEPT;
	echo "</td>\r\n    <td nowrap  >";
	echo $TEL_NO_HOME;
	echo "</td>\r\n    <td nowrap  >\r\n\t";
	if ( ifsendmbsms( ) )
	{
		echo "\t<A href=\"/general/mobile_sms?TO_ID1=";
		echo $MOBIL_NO;
		echo ",\">\r\n      ";
		echo $MOBIL_NO;
		echo "    </A>\r\n\t";
	}
	else
	{
		echo $MOBIL_NO;
	}
	echo "\t</td>\r\n    <td nowrap  ><a href=\"mailto:";
	echo $EMAIL;
	echo "\">\r\n      ";
	echo $EMAIL;
	echo "    </a></td>\r\n    <td nowrap   width=\"100\"><a href=\"javascript:add_detail('";
	echo $ADD_ID;
	echo "');\"> 详情</a> <a href=\"edit.php?ADD_ID=";
	echo $ADD_ID;
	echo "\"> 编辑</a> <a href=\"javascript:delete_add(";
	echo $ADD_ID;
	echo ");\"> 删除</a> </td>\r\n  </tr>\r\n  ";
}
if ( $ADD_COUNT == 0 )
{
	message( "提示", "".$GROUP_NAMEs."组尚无记录" );
	exit( );
}
else
{
	echo "  <thead class=\"TableHeader\">\r\n    ";
	$sens = $_REQUEST['sens'] ? 0 : 1;
	$sensimg = $_REQUEST['sens'] ? "arrow_up.gif" : "arrow_down.gif";
	$sensimg = "/images/".$sensimg;
	$sufurl = $_SERVER['PHP_SELF']."?sens=".$sens;
	echo "    <tr class=\"TableHeader\">\r\n      <td width=\"3%\" align=\"center\" nowrap>&nbsp;</td>\r\n      <td width=\"3%\" nowrap><a href=\"";
	echo $sufurl;
	echo "&order=seqnumber&GROUP_ID=";
	echo $_REQUEST['GROUP_ID'];
	echo "\">序号</a>\r\n        ";
	if ( $_REQUEST['order'] == "seqnumber" )
	{
		echo "<img src='".$sensimg."'>";
	}
	echo "</td>\r\n      <td width=\"5%\" nowrap><a href=\"";
	echo $sufurl;
	echo "&order=name&GROUP_ID=";
	echo $_REQUEST['GROUP_ID'];
	echo "\">姓名</a>\r\n        ";
	if ( $_REQUEST['order'] == "name" )
	{
		echo "<img src='".$sensimg."'>";
	}
	echo "</td>\r\n      <td width=\"8%\" nowrap><a href=\"";
	echo $sufurl;
	echo "&order=gender&GROUP_ID=";
	echo $_REQUEST['GROUP_ID'];
	echo "\">性别</a>\r\n        ";
	if ( $_REQUEST['order'] == "gender" )
	{
		echo "<img src='".$sensimg."'>";
	}
	echo "</td>\r\n      <td width=\"15%\" nowrap><a href=\"";
	echo $sufurl;
	echo "&order=comtel&GROUP_ID=";
	echo $_REQUEST['GROUP_ID'];
	echo "\">单位电话</a>\r\n        ";
	if ( $_REQUEST['order'] == "comtel" )
	{
		echo "<img src='".$sensimg."'>";
	}
	echo "</td>\r\n      <td width=\"15%\" nowrap><a href=\"";
	echo $sufurl;
	echo "&order=homtel&GROUP_ID=";
	echo $_REQUEST['GROUP_ID'];
	echo "\">家庭电话</a>\r\n        ";
	if ( $_REQUEST['order'] == "homtel" )
	{
		echo "<img src='".$sensimg."'>";
	}
	echo "</td>\r\n      <td width=\"15%\" nowrap><a href=\"";
	echo $sufurl;
	echo "&order=mobile&GROUP_ID=";
	echo $_REQUEST['GROUP_ID'];
	echo "\">手机</a>\r\n        ";
	if ( $_REQUEST['order'] == "mobile" )
	{
		echo "<img src='".$sensimg."'>";
	}
	echo "</td>\r\n      <td nowrap><a href=\"";
	echo $sufurl;
	echo "&order=email&GROUP_ID=";
	echo $_REQUEST['GROUP_ID'];
	echo "\">电子邮件</a>\r\n        ";
	if ( $_REQUEST['order'] == "email" )
	{
		echo "<img src='".$sensimg."'>";
	}
	echo "</td>\r\n      <td width=\"10%\" nowrap>操作</td>\r\n  </thead>\r\n  ";
	$CUR_MON = date( "m", time( ) );
	$CUR_DAY = date( "d", time( ) );
	$query = "SELECT * from ADDRESS where USER_ID='{$LOGIN_USER_ID}' and Month(BIRTHDAY)={$CUR_MON} and DAYOFMONTH(BIRTHDAY)={$CUR_DAY}";
	$cursor = exequery( $connection, $query );
	$ADD_COUNT = 0;
	while ( $ROW = mysql_fetch_array( $cursor ) )
	{
		++$ADD_COUNT;
		$ADD_ID = $ROW['ADD_ID'];
		$PSN_NAME = $ROW['PSN_NAME'];
		$SEX = $ROW['SEX'];
		switch ( $SEX )
		{
		case "0" :
			$SEX = "男";
			break;
		case "1" :
			$SEX = "女";
		}
		$PERSON_STR .= "<A href='javascript:add_detail({$ADD_ID});'>{$PSN_NAME}({$SEX})</A>&nbsp&nbsp&nbsp&nbsp";
		if ( $ADD_COUNT == 1 )
		{
			echo "  <tr class=\"TableData\">\r\n    <td nowrap style=\"color:#46A718\" >&nbsp;</td>\r\n    <td nowrap style=\"color:#46A718\" >今天生日:</td>\r\n    <td nowrap colspan=\"6\"><marquee style=\"color:#FF6600;\" behavior=scroll scrollamount=3 scrolldelay=120 onmouseover='this.stop()' onmouseout='this.start()' border=0>\r\n      ";
			echo $PERSON_STR;
			echo "      </marquee>    </td>\r\n  </tr>\r\n  ";
		}
	}
}
echo "</table>\r\n<table width=\"100%\" cellpadding=\"5\" cellspacing=\"0\" >\r\n  <tr class=\"TableLine2\">\r\n    <td><label for=\"allbox\"><input type=\"checkbox\" id=\"allbox\" name=\"allbox\" ";
if ( $LINE_COUNT )
{
	echo "onClick=\"check_all();\"";
}
echo ">\r\n\t  全部选中</label>\r\n      <input name=\"button\" type=\"button\" class=\"SmallButton\" title=\"删除所选邮件\" ";
if ( $LINE_COUNT )
{
	echo "onClick=\"delete_select();\"";
}
echo " value=\"删除\">\r\n      &nbsp;&nbsp;</td>\r\n  </tr>\r\n</table>\r\n<table width=\"100%\"  border=\"0\" cellspacing=\"2\" cellpadding=\"2\">\r\n  <tr>\r\n    <td align=\"right\">";
disp( "sens=".$_REQUEST['sens']."&order=".$_REQUEST['order']."&GROUP_ID=".$_REQUEST['GROUP_ID'] );
echo "</td>\r\n  </tr>\r\n</table>\r\n";
echo "<s";
echo "cript language=\"javascript\">\r\n\tfunction check_one(el)\r\n\t{\r\n\t\tif(!el.checked)\r\n\t\t\tdocument.all(\"allbox\").checked=false;\r\n\t}\r\n</script>\r\n";
if ( 0 < ( $n = $cur_page - $total_page_nums ) )
{
	$cur_page = $cur_page - $n;
	header( "location:".$_SERVER['PHP_SELF']."?&order=".$_REQUEST['order']."&sens=".$_REQUEST['sens']."&cur_page=".$cur_page."&GROUP_ID=".$_REQUEST['GROUP_ID'] );
}
echo "</body>\r\n</html>\r\n";
?>

⌨️ 快捷键说明

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