📄 birthday_praise.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" %>
<jsp:useBean id="Constellation" scope="page" class="cn.com.aheadsoft.data.ConstellationData"/>
<%@ page import="
javax.naming.*,
java.util.Date,
java.io.*,
java.sql.*,
java.util.Calendar,
cn.com.aheadsoft.recordset.BirthCardRecordSet
"%>
<%@ page import="cn.com.aheadsoft.util.TheProperties"%>
<%@ page import="cn.com.aheadsoft.recordset.PersonInfoRecordSet,cn.com.aheadsoft.recordset.DeptInfoRecordSet,cn.com.aheadsoft.util.StringFormat,cn.com.aheadsoft.recordset.LevelRecordSet,cn.com.aheadsoft.recordset.OccupDicRecordSet,cn.com.aheadsoft.util.UserInfo,cn.com.aheadsoft.manage.UserPurviewManage" %>
<%
UserInfo userinfo = (UserInfo)session.getAttribute("userinfo");
String card_file="";
String send_name =userinfo.GetUserName();
if(userinfo.GetUserID() != null){
send_name = userinfo.GetUserID();
}
String username =request.getParameter("username");
if(!TheProperties.ENCODE.equalsIgnoreCase("iso8859_1")){
username=new String(username.getBytes("iso8859_1"),"gb2312");
}
String time = request.getParameter("time");
String create_time="";
String context="";
String card_content="";
String display="";
String B_Date="";
String B_Month="";
String birth=request.getParameter("birthDate");
int birth_Year=Integer.parseInt(birth.substring(0,4));
B_Month=birth.substring(5,6);
if (!B_Month.equals("0"))
B_Month=birth.substring(5,7);
else
B_Month=birth.substring(6,7);
B_Date=birth.substring(8,9);
if(B_Date.equals("0"))
B_Date=birth.substring(birth.length()-1,birth.length());
else
B_Date=birth.substring(birth.length()-2,birth.length());
int index=0;
display =request.getParameter("display");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>生日贺卡</title>
<style type="text/css">
<!--
body {
font-family: "宋体";
font-size: 12px;
text-decoration: none;
}
table {
font-family: "宋体";
font-size: 12px;
}
a {
text-decoration: none;
}
-->
</style>
<script>
function b_submit(){
var maxlength=document.all["wish_context"].value;
if(maxlength.length>100)
{
alert("输入的内容不得大于100字!");
return false;
}
return true;
}
function sendFlower(){
var message=document.all["wish_context"].value;
document.all["wish_context"].value=message+document.all["flower"].value;
}
function sendMessage(){
var message=document.all["wish_context"].value;
document.all["wish_context"].value=message+document.all["word"].value;
}
function checkForm(){
if(document.form1.wish_context.value.length<1){
alert("请写上你的祝福语再提交,谢谢合作!");
return false;
}
return true;
}
</script>
<link rel="stylesheet" type="text/css" href="/krm/jsp/css/css.css">
<BGSOUND SRC="/krm/jsp/birthday/birthday.mid" LOOP=INFINITE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="ys.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<table width="600" height="0" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="/krm/servlet/BirthCardServlet?module=p&&status=i" onsubmit="return checkForm()"> <tr>
<td width="600" background="/krm/jsp/personimage/sky.jpg"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="19%" height="160">
<table width="100%" height="155" border="5" bordercolor="#004080">
<tr>
<td height="149">
<%
StringBuffer Name=new StringBuffer();
Name = (StringBuffer)request.getAttribute("Name");
%>
<%=Name%></td>
</tr>
</table>
</td>
<td width="81%" colspan="1"><p> <strong>姓名</strong>:<%=username%>
<%
Constellation.CountAnimal(birth_Year);
Constellation.CountConstellation(Integer.parseInt(B_Month),Integer.parseInt(B_Date));
String strAnimal=Constellation.getBirth_Animal();
String strFlower=Constellation.getHealth_LuckFlower();
String strConstellation=Constellation.getConstellation();
String strHealth_Sport=Constellation.getHealth_Sport();
String strHealth_Food=Constellation.getHealth_Food();
String strHealth_Charm=Constellation.getHealth_Charm();
String strConstellationIntroduction=Constellation.getConstellationIntroduction();
if(TheProperties.ENCODE.equalsIgnoreCase("iso8859_1")){
strAnimal=new String(strAnimal.getBytes("gb2312"),"iso8859_1");
strFlower=new String(strFlower.getBytes("gb2312"),"iso8859_1");
strConstellation=new String(strConstellation.getBytes("gb2312"),"iso8859_1");
strHealth_Sport=new String(strHealth_Sport.getBytes("gb2312"),"iso8859_1");
strHealth_Food=new String(strHealth_Sport.getBytes("gb2312"),"iso8859_1");
strHealth_Charm=new String(strHealth_Charm.getBytes("gb2312"),"iso8859_1");
strConstellationIntroduction=new String(strConstellationIntroduction.getBytes("gb2312"),"iso8859_1");
}
%>
<strong>生肖</strong>: <%=strAnimal%>
<strong>星座</strong>:<%=strConstellation%>
<strong>幸运花</strong>:<%=strFlower%><br>
<br>
<strong>健康饮食:</strong><%=strHealth_Food%><strong> 健康运动:</strong><%=strHealth_Sport%> <br>
<br>
<strong>星座介绍:</strong><%=strConstellationIntroduction%><br>
<br>
<strong>魅力指数:</strong><%=strHealth_Charm%>
<br>
<br>
<br>
</p>
</td>
</tr>
<tr valign="top">
<td colspan="3"><table width="100%" border="1" bordercolor="#232323" bordercolordark="#242424">
<tr>
<td height="75" valign="top" background="/krm/jsp/personimage/back.jpg">
<p align="center"><img src="/krm/jsp/personimage/happyall.gif" width="283" height="70"><img src="/krm/jsp/personimage/happy.gif" width="283" height="70"></p>
</td>
</tr>
</table>
<table width="101%" border="1" cellpadding="0" cellspacing="0">
<tr class="unnamed2">
<td height="24" colspan="2" bgcolor="#DFEFFF" class="unnamed2">
<p align="left" class="unnamed2"><strong><font color="#FF0000"> <font color="#CC0000">祝福语:</font></font></strong></p>
<%
String send_UserName="";
String create_Time="";
BirthCardRecordSet birthCardRs = new BirthCardRecordSet();
birthCardRs = (BirthCardRecordSet)request.getAttribute("birthCardRs");
while(birthCardRs.next()){
index=index+1;
send_UserName = birthCardRs.getSend_UserName();
context = birthCardRs.getWish_Content();
create_Time = birthCardRs.getCreate_Time();
%>
<p><%=(index)%>)<%=context%> <br>
<font color="#808080"> <%=send_UserName%> <%=create_Time%></font></p>
<%
}
%>
<p align="left" class="unnamed2"> </p></td>
</tr>
<tr>
<td width="30%" class="unnamed1"> </td>
<td width="70%"></td>
</tr>
<% if (display=="" || !display.trim().equals("no")) {%>
<tr>
<td bgcolor="#ABD0E7" class="unnamed2" align="left"> <br>
<font color="#002040"><strong>请选择贺词!</strong></font><br>
<br>
<select name="word" >
<option value="祝你">祝你</option>
<option value="生日快乐!">生日快乐!</option>
<option value="吉祥如意!">吉祥如意!</option>
<option value="身体健康!">身体健康!</option>
<option value="合家幸福!">合家幸福!</option>
<option value="百事可乐!">百事可乐!</option>
<option value="万事如意!">万事如意!</option>
<option value="岁岁平安!">岁岁平安!</option>
<option value="工作顺利!">工作顺利!</option>
<option value="心想事成!">心想事成!</option>
<option value="事事顺心!">事事顺心!</option>
<option value="一帆风顺!">一帆风顺!</option>
<option value="家庭美满!">家庭美满!</option>
<option value="生意兴隆!">生意兴隆!</option>
<option value="万事顺心!">万事顺心!</option>
<option value="笑口常开!">笑口常开!</option>
<option value="步步高升!">步步高升!</option>
</select>
<input type="button" name="Submit2" value="添加->" onClick="sendMessage()">
<br>
<font color="#002346"><strong>请选择幸运花!</strong></font>
<input type="button" name="Submit22" value="添加->" onClick="sendFlower()">
<br>
<select name="flower">
<option value="送你一朵紫罗兰!">送你一朵紫罗兰!</option>
<option value="送你一朵秋牡丹!">送你一朵秋牡丹!</option>
<option value="送你一朵玫瑰!">送你一朵玫瑰!</option>
<option value="送你一朵铃兰!">送你一朵铃兰!</option>
<option value="送你一朵百合!">送你一朵百合!</option>
<option value="送你一朵向日葵!">送你一朵向日葵!</option>
<option value="送你一朵风信子!">送你一朵风信子!</option>
<option value="送你一朵红玫瑰!">送你一朵红玫瑰!</option>
<option value="送你一朵石竹花!">送你一朵石竹花!</option>
<option value="送你一朵康乃馨!">送你一朵康乃馨!</option>
<option value="送你一朵水仙花!">送你一朵水仙花!</option>
<option value="送你一朵勿忘我!">送你一朵勿忘我!</option>
<option value="送你一朵茉莉花!">送你一朵茉莉花!</option>
<option value="送你一朵三色紫罗兰!">送你一朵三色紫罗兰!</option>
</select>
<br>
<br>
<br>
<br>
<br>
<br>
</td>
<td bgcolor="#D2E9FF" align="center">
<textarea name="wish_context" style="overflow:auto" cols="56" rows="8" ></textarea>
<input type="hidden" name="birthday" value="<%=birth%>">
<input type="hidden" name="username" value="<%=username%>">
<input type="hidden" name="send_name" value="<%=send_name%>">
<br>
<font color="#002448"><strong>内容小于100个字!</strong></font>
<p> <font face="宋体" size="5">
<input type="submit" class="button1" name="Submit" height="20"width="100" value="发送我的祝福" onClick="return b_submit()">
</font>
</p></td>
</tr>
<tr>
<td height="15" colspan="2" class="unnamed1"><div class="unnamed1" align="center">
</div></td>
</tr>
<%}%>
</table></td>
</tr>
</table></td>
</tr>
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -