<tr class="tr_h">
<td class="printtable" height="20" valign="middle" width="30%" align="right">
<b>手机号码</b>
</td>
<td class="printtable" height="20" valign="middle" width="70%">
<input type="text" name="TELNUM" value="" maxlength="11" class="input" style="width:100%">
</td>
</tr>
<tr class="tr_h">
<td class="printtable" height="20" valign="middle" width="30%" align="right">
<b>交易类型</b>
</td>
<td class="printtable" height="20" valign="middle" width="70%">
<select name="pkgcode">
<option value="0">全部类型</option>
<%
for(int i=0;i<n;i++)
{
%>
<option value=<%=(String)pkg_code.get(i)%>><%=(String)pkg_desc.get(i)%></option>
<%
}
%>
</select>
</td>
</tr>
<tr class="tr_h">
<td class="printtable" height="20" valign="middle" width="20%" align="right">
<b>开始日期</b>
</td>
<td class="printtable" height="20" valign="middle" width="80%">
<input type = "text" name="beginTime" class="input" style="width:100%" onClick="show_cele_date(beginTime,'','',beginTime)" onKeypress="show_cele_date(beginTime,'','',beginTime)" readonly>
</td>
</tr>
<tr class="tr_h">
<td class="printtable" height="20" valign="middle" width="20%" align="right">
<b>结束日期</b>
</td>
<td class="printtable" height="20" valign="middle" width="80%">
<input type = "text" name="endTime" class="datainput" onClick="show_cele_date(endTime,'','',endTime)" onKeypress="show_cele_date(endTime,'','',endTime)" style="width:100%" readonly>
</td>
</tr>
</table> <p align="center"> <input class="input" type="button" onclick="on_submit()" value="提交" style="width:50;height:20" name="B1"> <input class="input" type="reset" value="重置" style="width:50;height:20" name="B2"> </p>
</form>
<script language="javascript">
function onSubmit()
{
var beginDate=document.form1.beginTime.value;
var endDate=document.form1.endTime.value;
var curDate="2005-5-8"; if(beginDate.length!=10){
alert("起始时间长度不对,应为YYYY-MM-DD形式");
return ;
} if(endDate.length!=10){
alert("结束时间长度不对,应为YYYY-MM-DD形式");
return ;
}//判断结束时间是否大于当前时间
if(endDate>curDate){
alert("结束时间不能大于当前日期 "+curDate);
return;
}//判断起始时间是否小于结束时间
if(document.form1.beginTime.value > document.form1.endTime.value)
{
alert("起始时间应该小于结束时间,请您检查后重新输入!");
return;
}//判断查询时间段是否小于31天
var beginYear=beginDate.substr(0,4);
var beginMonth=beginDate.substr(5,2);
var beginDay=beginDate.substr(8,2); var endYear=endDate.substr(0,4);
var endMonth=endDate.substr(5,2);
var endDay=endDate.substr(8,2); var curYear=2005
var curMonth=5
var curDay=8 var days=new Array(12);
days[0]=1; if(isLeapYear(beginYear)){
days[1]=-1;
}
else {
days[1]=-2;
} days[2]=1;
days[3]=0;
days[4]=1;
days[5]=0;
days[6]=1;
days[7]=1;
days[8]=0;
days[9]=1;
days[10]=0;
days[11]=1;
var diff=(endYear-beginYear)*365+(endMonth-beginMonth)*30+(endDay-beginDay)+days[beginMonth-1];
if(diff>31){
alert("查询时间段不能超过31天");
return ;
} document.form1.submit();}
function SelectDate(DivID)
{
var fullPath="<%=netunicom.Sysinit.webroot%>/js/popdate.jsp";
var strDate; //Chinese date formate
var intDate; //Integer date formate
var objEffectDate=eval("form1." + DivID);
intDate=showModalDialog(fullPath,window,"dialogWidth=340px;dialogHeight=300px;center=yes;border=this;help=no");
if (intDate!=null)
{
objEffectDate.value=intDate.substr(0,4)+"-"+intDate.substr(5,2)+"-"+intDate.substr(8,2);
if (objEffectDate.value!="undefined")
{
strDate=intDate.substr(0,4)+"-"+intDate.substr(5,2)+"-"+intDate.substr(8,2);
objEffectDate.value=strDate;
}
else
{
objEffectDate.value="";
}
}
event.returnValue =false;
}//判断是否为润年
function isLeapYear(year){
if(year%100==0){
if(year%400==0){
return true;
}
}
else if(year%4==0){
return true;
}
return false;
}
</script>
<td class="printtable" height="20" valign="middle" width="30%" align="right">
<b>手机号码</b>
</td>
<td class="printtable" height="20" valign="middle" width="70%">
<input type="text" name="TELNUM" value="" maxlength="11" class="input" style="width:100%">
</td>
</tr>
<tr class="tr_h">
<td class="printtable" height="20" valign="middle" width="30%" align="right">
<b>交易类型</b>
</td>
<td class="printtable" height="20" valign="middle" width="70%">
<select name="pkgcode">
<option value="0">全部类型</option>
<%
for(int i=0;i<n;i++)
{
%>
<option value=<%=(String)pkg_code.get(i)%>><%=(String)pkg_desc.get(i)%></option>
<%
}
%>
</select>
</td>
</tr>
<tr class="tr_h">
<td class="printtable" height="20" valign="middle" width="20%" align="right">
<b>开始日期</b>
</td>
<td class="printtable" height="20" valign="middle" width="80%">
<input type = "text" name="beginTime" class="input" style="width:100%" onClick="show_cele_date(beginTime,'','',beginTime)" onKeypress="show_cele_date(beginTime,'','',beginTime)" readonly>
</td>
</tr>
<tr class="tr_h">
<td class="printtable" height="20" valign="middle" width="20%" align="right">
<b>结束日期</b>
</td>
<td class="printtable" height="20" valign="middle" width="80%">
<input type = "text" name="endTime" class="datainput" onClick="show_cele_date(endTime,'','',endTime)" onKeypress="show_cele_date(endTime,'','',endTime)" style="width:100%" readonly>
</td>
</tr>
</table> <p align="center"> <input class="input" type="button" onclick="on_submit()" value="提交" style="width:50;height:20" name="B1"> <input class="input" type="reset" value="重置" style="width:50;height:20" name="B2"> </p>
</form>
<script language="javascript">
function onSubmit()
{
var beginDate=document.form1.beginTime.value;
var endDate=document.form1.endTime.value;
var curDate="2005-5-8"; if(beginDate.length!=10){
alert("起始时间长度不对,应为YYYY-MM-DD形式");
return ;
} if(endDate.length!=10){
alert("结束时间长度不对,应为YYYY-MM-DD形式");
return ;
}//判断结束时间是否大于当前时间
if(endDate>curDate){
alert("结束时间不能大于当前日期 "+curDate);
return;
}//判断起始时间是否小于结束时间
if(document.form1.beginTime.value > document.form1.endTime.value)
{
alert("起始时间应该小于结束时间,请您检查后重新输入!");
return;
}//判断查询时间段是否小于31天
var beginYear=beginDate.substr(0,4);
var beginMonth=beginDate.substr(5,2);
var beginDay=beginDate.substr(8,2); var endYear=endDate.substr(0,4);
var endMonth=endDate.substr(5,2);
var endDay=endDate.substr(8,2); var curYear=2005
var curMonth=5
var curDay=8 var days=new Array(12);
days[0]=1; if(isLeapYear(beginYear)){
days[1]=-1;
}
else {
days[1]=-2;
} days[2]=1;
days[3]=0;
days[4]=1;
days[5]=0;
days[6]=1;
days[7]=1;
days[8]=0;
days[9]=1;
days[10]=0;
days[11]=1;
var diff=(endYear-beginYear)*365+(endMonth-beginMonth)*30+(endDay-beginDay)+days[beginMonth-1];
if(diff>31){
alert("查询时间段不能超过31天");
return ;
} document.form1.submit();}
function SelectDate(DivID)
{
var fullPath="<%=netunicom.Sysinit.webroot%>/js/popdate.jsp";
var strDate; //Chinese date formate
var intDate; //Integer date formate
var objEffectDate=eval("form1." + DivID);
intDate=showModalDialog(fullPath,window,"dialogWidth=340px;dialogHeight=300px;center=yes;border=this;help=no");
if (intDate!=null)
{
objEffectDate.value=intDate.substr(0,4)+"-"+intDate.substr(5,2)+"-"+intDate.substr(8,2);
if (objEffectDate.value!="undefined")
{
strDate=intDate.substr(0,4)+"-"+intDate.substr(5,2)+"-"+intDate.substr(8,2);
objEffectDate.value=strDate;
}
else
{
objEffectDate.value="";
}
}
event.returnValue =false;
}//判断是否为润年
function isLeapYear(year){
if(year%100==0){
if(year%400==0){
return true;
}
}
else if(year%4==0){
return true;
}
return false;
}
</script>
解决方案 »
- Tomcat7.0bug处理不了啊
- 急急急!!!JSTL<c:if>判断问题
- .equals("")和==""的区别
- JAVA的main方法
- Struts中自定义Validate的问题
- 如果在html页面之间传一个参数(只能用html和js,不能用jsp,asp.php等)
- 使用Hibernate出现的中文问题,求教,急。。。。
- Jbuilder开发WebService问题,高手进,急.......
- jboss4.0 跨网络访问的问题(八百里加急)!
- 关于servlet开发,import javax.servlet.* 包的引用
- 五湖四海的朋友帮帮忙啊
- 求助JBuilder9配置SQL2000数据库问题
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.sql.*;
import java.util.ArrayList;
import java.util.Hashtable;
import org.apache.struts.action.*;
import org.apache.struts.util.MessageResources;
import org.cj.utils.*;
import netunicom.*;
import netunicom.utils.Tools;
import netunicom.servlets.bean.User_diaochaBean;
import javax.servlet.http.*;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;public class Manager_skt_logAction extends Action
{ protected static MessageResources messages = MessageResources.getMessageResources("org.apache.struts.actions.LocalStrings"); public Manager_skt_logAction()
{
} public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception
{
//身份验证
Log log=LogFactory.getLog(this.getClass().getName()); String path = mapping.getParameter(); HttpSession session=request.getSession(false); if(path == null)
{
throw new ServletException(messages.getMessage("forward.path"));
}
else
{
if (session.getAttribute("uniuser")==null)
{
request.setAttribute("ERRDESC","请您登陆系统!");
path="errpage";
}
else
{ //权限控制begin 最后要进行改写
String roleid;
Uniuser myself=(Uniuser) session.getAttribute("uniuser");
roleid=myself.getUser_role(); String menuid="";
Hashtable d=netunicom.sys.Menus.HmenuViews;
netunicom.sys.MenuView myV=null;
if ((netunicom.sys.MenuView) d.get(path)!=null)
myV=(netunicom.sys.MenuView) d.get(path);
if (myV!=null)
{
menuid=myV.getMENUID();
if (netunicom.sys.Role_Menus.haveMenu(roleid,menuid)==false)
{
request.setAttribute("ERRDESC","您没有该操作权限!");
path="errpage";
}
}
//权限控制end;
if (path.compareTo("errpage")!=0)
{
//业务受理begin
ArrayList pkg_code=new ArrayList();//交易码
ArrayList pkg_desc=new ArrayList();//交易类型
String sql_str="select pkgcode from TAB_PR_LIMITCOUNT";
log.info(sql_str);
Connection conn= null;
Statement stmt= null;
ResultSet res=null;
try
{
conn= netunicom.Ds.getDs().getConnection();
stmt= conn.createStatement();
res=stmt.executeQuery(sql_str);
while(res.next())
{
String pkgcode=res.getString("pkgcode");
if(pkgcode==null)
pkgcode="0";
pkg_code.add(pkgcode);
Hashtable d1=new Hashtable();
d1=(Hashtable) netunicom.TradePrSet.pkgdtl.get(PF.trim(pkgcode));
if (d1!=null)
pkg_desc.add((String)d1.get("pkgdesc"));
else
pkg_desc.add(pkgcode);
}
}
catch(Exception e)
{
log.info(e);
request.setAttribute("ERRDESC",e.toString());
path="errpage";
}
finally
{
try
{
if (res!=null)
res.close();
if (stmt!=null)
stmt.close();
if (conn!=null)
conn.close();
}
catch(Exception e1)
{
log.info(e1);
request.setAttribute("ERRDESC",e1.toString());
path="errpage";
}
} request.setAttribute("pkg_code",pkg_code);
request.setAttribute("pkg_desc",pkg_desc);
//业务受理end
}
}
ActionForward retVal;
request.setAttribute("definition","manager_skt_log");
retVal= new ActionForward(path);
retVal.setContextRelative(true);
return retVal;
}
}}
String telnum=request.getParameter("TELNUM");
String beginTime=request.getParameter("beginTime");
String endTime=request.getParameter("endTime");
String pkgcode=request.getParameter("pkgcode");
因为manager_skt_log.jsp里的FORM提交地址ACTION=“”,我在Manager_skt_logAction里也没找到向manager_skt_log_view.jsp页面转向的代码,不知这是怎么处理的?还望大虾耐心看完,帮小弟解决一下!
form1.action="manager_skt_log_view.do";
form1.submit();