📄 index.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/function_page_01.php" );
include_once( "inc/utility_all.php" );
echo "\r\n<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 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 URL=\"delete.php?ADD_ID=\" + ADD_ID;\r\n";
echo " 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 "\r\n<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\"> 公共地址簿(";
echo $GROUP_NAME;
echo ")</td>\r\n </tr>\r\n <tr class=\"tablehead2\"><td>\r\n <a href=\"search.php\"><img src=\"/images/button/search.gif\" border=\"0\"></a>\r\n </td>\r\n </tr>\r\n</table>\r\n<br>\r\n";
include( "../menu.inc" );
echo "<table border=\"0\" cellspacing=\"1\" width=\"100%\" class=\"small\" cellpadding=\"5\">\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%\" 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 </tr>\r\n ";
$sql = "SELECT * from ADDRESS where USER_ID='' and GROUP_ID='{$GROUP_ID}' ";
switch ( $_REQUEST['order'] )
{
case "name" :
$sql .= " ORDER BY PSN_NAME";
break;
case "gender" :
$sql .= " ORDER BY SEX";
break;
case "comtel" :
$sql .= " ORDER BY TEL_NO_DEPT";
break;
case "homtel" :
$sql .= " ORDER BY TEL_NO_HOME";
break;
case "mobile" :
$sql .= " ORDER BY MOBIL_NO";
break;
case "email" :
$sql .= " ORDER BY EMAIL";
break;
case "seqnumber" :
$sql .= " ORDER BY SEQNUMBER";
break;
default :
$sql .= " ORDER BY SEQNUMBER";
break;
}
$sql .= $_REQUEST['sens'] ? " ASC" : " DESC";
$sql = page( $sql, 10 );
$cursor = exequery( $connection, $sql );
$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 ( $LINE_COUNT % 2 == 1 )
{
$TableLine = "TableLine1";
}
else
{
$TableLine = "TableLine2";
}
echo " <tr class=\"";
echo $TableLine;
echo "\">\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>";
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 "</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> </td>\r\n </tr>\r\n ";
}
echo " ";
$CUR_MON = date( "m", time( ) );
$CUR_DAY = date( "d", time( ) );
$query = "SELECT * from ADDRESS where 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>    ";
if ( $ADD_COUNT == 1 )
{
echo " <tr class=\"TableData\">\r\n <td nowrap align=\"center\" style=\"color:#46A718\" > </td>\r\n <td align=\"center\" nowrap style=\"color:#46A718\" >今天生日:</td>\r\n <td nowrap align=\"center\" 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>\r\n </td>\r\n </tr>\r\n ";
}
}
echo "</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</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -