index.php

来自「极限网络智能办公系统 Office Automation V3.0官方100%源」· PHP 代码 · 共 172 行

PHP
172
字号
<?
include_once("inc/auth.php");
?>

<html>
<head>
<title>通讯簿</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function add_detail(ADD_ID)
{
 URL="add_detail.php?ADD_ID="+ADD_ID;
 myleft=(screen.availWidth-500)/2;
 window.open(URL,"detail","height=550,width=400,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=50,left="+myleft+",resizable=yes");
}

function delete_add(ADD_ID)
{
 msg='确认要删除该联系人么?';
 if(window.confirm(msg))
 {
  URL="delete.php?ADD_ID=" + ADD_ID;
  window.location=URL;
 }
}

</script>
</head>
<body class="bodycolor" topmargin="5">
<?
 $connection=OpenConnection();
 $query = "SELECT * from ADDRESS_GROUP where GROUP_ID='$GROUP_ID'";
 $cursor= exequery($connection,$query);
 if($ROW=mysql_fetch_array($cursor))
    $GROUP_NAME=$ROW["GROUP_NAME"];
 if($GROUP_ID==0)
    $GROUP_NAME="默认";
?>


<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/menu/address.gif" align="absmiddle"><span class="big3"> 公共地址簿(<?=$GROUP_NAME?>)</span>
    </td>
  </tr>
</table>

<br>

<?

 //============================ 公共地址簿 =======================================
 $query = "SELECT * from ADDRESS where USER_ID='' and GROUP_ID='$GROUP_ID' order by PSN_NAME";
 $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"];
    $DEPT_NAME=$ROW["DEPT_NAME"];
    $TEL_NO_DEPT=$ROW["TEL_NO_DEPT"];
    $MOBIL_NO=$ROW["MOBIL_NO"];
    $EMAIL=$ROW["EMAIL"];

    if($MOBIL_NO!="")
       $MOBIL_NO_STR.=$MOBIL_NO.",";

    switch($SEX)
    {
     case "0":
         $SEX="男";
         break;
     case "1":
         $SEX="女";
         break;
    }


    if($ADD_COUNT==1)
    {
?>

    <table border="0" cellspacing="1" width="95%" class="small" bgcolor="#000000" cellpadding="3">

<?
    }
?>
    <tr class="TableData">
      <td nowrap align="center"><a href="javascript:add_detail('<?=$ADD_ID?>');"><?=$PSN_NAME?></a></td>
      <td nowrap align="center"><?=$SEX?></td>
      <td nowrap align="center"><?=$DEPT_NAME?></td>
      <td nowrap align="center"><?=$TEL_NO_DEPT?></td>
      <td nowrap align="center"><A href="/general/mobile_sms?TO_ID1=<?=$MOBIL_NO?>,"><?=$MOBIL_NO?></A></td>
      <td nowrap align="center"><a href="mailto:<?=$EMAIL?>"><?=$EMAIL?></a></td>
      <td nowrap align="center" width="100">
          <a href="javascript:add_detail('<?=$ADD_ID?>');"> 详情</a>
      </td>
    </tr>
<?
 }

 if($ADD_COUNT==0)
 {
   Message("","通讯簿尚无记录");
   exit;
 }
 else
 {
?>
   <thead class="TableHeader">
      <td nowrap align="center">姓名</td>
      <td nowrap align="center">性别</td>
      <td nowrap align="center">单位名称</td>
      <td nowrap align="center">单位电话</td>
      <td nowrap align="center">手机 <a href="javascript:form1.submit();">群发</a></td>
      <td nowrap align="center">电子邮件</td>
      <td nowrap align="center">操作</td>
   </thead>
<?
 //============================ 今日生日 =======================================
 $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="女";
         break;
    }

    $PERSON_STR.="<A href='javascript:add_detail($ADD_ID);'>$PSN_NAME($SEX)</A>&nbsp&nbsp&nbsp&nbsp";
    if($ADD_COUNT==1)
    {
?>
   <tr class="TableData">
      <td nowrap align="center" style="color:#46A718" >今天生日:</td>
      <td nowrap align="center" colspan="6">
      <marquee style="color:#FF6600;" behavior=scroll scrollamount=3 scrolldelay=120 onmouseover='this.stop()' onmouseout='this.start()' border=0>
      <?=$PERSON_STR?>
      </marquee>
      </td>
   </tr>
<?
    }
 }
}
?>
   </table>
<form name="form1" method="post" action="/general/mobile_sms/new/index.php">
   <input type="hidden" name="TO_ID1" value="<?=$MOBIL_NO_STR?>">
</form>
</body>
</html>

⌨️ 快捷键说明

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