生日提醒

<html>

<!--#include file="S_Sq.asp"-->
<!--连接数据库--><%'本月生日
  Sql="select S_UserGh,S_UserXm,S_UserSr,datediff(day,getdate(),(convert(varchar(4),year(getdate()))+'-'+convert(varchar(2),month(S_userSr))+'-'+convert(varchar(2),day(S_userSr)))) from usertb where month(s_usersr)=month(getdate())+2"
  Sql=Sql&" select S_UserGh,S_UserXm,S_UserSr,datediff(day,getdate(),(convert(varchar(4),year(getdate()))+'-'+convert(varchar(2),month(S_userSr))+'-'+convert(varchar(2),day(S_userSr)))) from usertb where month(s_usersr)=month(getdate())+1"
  Sql=CheckSqlStr(Sql)
  response.write sql
  Set Rs=conn.execute(sql)
  arrA=rs.GetRows '本月生日
  set rs=rs.NextRecordset   '最关键的一步
  arrB=rs.GetRows '下月生日
  Rs.close
  set rs=nothing
  CONN.close
  set CONN=Nothing
  rowsA=ubound(arrA,2) '----提取本月生日
  rowsB=ubound(arrB,2) '-----同上,提取下月生日
%>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>本月寿星</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>

<script>
function opxx(s)
{ open(""+s,'','resizable=0,scrollbars=0,status=no,menubar=no,toolbar=no,location=no,height=250, width=300, top=150,left=250,menu=no','fullscreen,scrollbars' );
};
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
</script>

<body bgcolor="#499ABA">

<table width="100%" id="table1">
 <tr>
  <td>
  <table cellspacing="0" cellpadding="0" border="0" id="table2">
   <tr>
    <td style="POSITION: relative">
    <img onmouseover="MM_showHideLayers('LayerBirth','','show')" onmouseout="MM_showHideLayers('LayerBirth','','show')" src="images/birth.gif" align="middle" border="0"></a>
    <div id="LayerBirth" onmouseover="MM_showHideLayers('LayerBirth','','show')" style="Z-INDEX: 1; VISIBILITY: hidden; POSITION: absolute" onmouseout="MM_showHideLayers('LayerBirth','','hide')">
     <table height="3" cellspacing="0" cellpadding="0" width="200" border="0" id="table3">
      <tr>
       <td><img height="4" src="images/button_57.gif" width="200"></td>
      </tr>
     </table>
     <table cellspacing="0" cellpadding="0" width="200" bgcolor="#ffffff" border="0" id="table4">
      <tr>
       <td valign="top" width="80" bgcolor="#ffeaea" rowspan="3">
       <img height="96" src="images/buttonbir.gif" width="78"><br>
       fds</td>
       <td width="10" bgcolor="#ffffff" rowspan="3"></td>
      </tr>
      <tr>
       <td class="hui" valign="top" bgcolor="#ffffff"><font color="#cd0000">本月寿星</font><br>
       <%for i=0 to rowsA%>
       <a class="hui" href="javascript:opxx('UserP.asp?UserGh=<%=arrA(0,i)%>')">
       <%=arrA(1,i)%>(<%=right(year(cstr(arrA(2,i))),2)&"/"&month(cstr(arrA(2,i)))%>)</a><br>
       <%next%> <font color="#cd0000">下月寿星</font><br>
       <%for i=0 to rowsB%>
       <a class="hui" href="javascript:opxx('UserP.asp?UserGh=<%=arrB(0,i)%>')">
       <%=arrB(1,i)%>(<%=right(year(cstr(arrB(2,i))),2)&"/"&month(cstr(arrB(2,i)))%>)</a><br>
       <%next%> </td>
      </tr>
      <tr>
       <td bgcolor="#ffffff"></td>
      </tr>
     </table>
     <table height="3" cellspacing="0" cellpadding="0" width="200" border="0" id="table5">
      <tr>
       <td><img height="4" src="images/button_58.gif" width="200"></td>
      </tr>
     </table>
    </div>
    </td>
   </tr>
  </table>
  </td>
 </tr>
</table>

</body>

</html>

posted on 2004-04-17 10:19  乔本生涯a  阅读(774)  评论(3编辑  收藏  举报

导航